Real-Time Image Rendering Service for Personalized Advertising Using Rust
To eliminate wasteful pre‑generated ad creatives, a Taobao team built a high‑concurrency, Rust‑based real‑time image rendering service that safely composes personalized templates on the fly, delivering thousands of requests per second with millisecond latency, powering diverse advertising scenarios and achieving roughly a 36 % business lift.
Personalized recommendation is widely used in new media, e-commerce, and gaming. When users open mobile Taobao, the platform provides personalized product recommendations based on browsing and purchase history. The challenge is how to present diverse, stylized personalized product displays in the app.
To address the problem of generating massive amounts of ad creatives, the article introduces the concept of templates designed by professional designers for different categories, styles, and scenarios. However, pre‑generating all possible combinations leads to huge waste, and updating creatives requires regenerating large volumes, hindering fast iteration.
In 2016, after several technical discussions, the team chose Rust—a language not yet mature at the time—to develop a high‑concurrency image real‑time rendering service. The service works like a CDN image endpoint, rendering images on the fly from engine‑provided materials.
Reasons for selecting Rust include safety (strong typing, memory management, strict variable control) which is critical for an online service where errors cause blank ad slots; performance (near C/C++ speed) demonstrated on a 32‑core 2.5 GHz / 128 GB RAM / 600 GB SSD server, achieving 5000 req/s at 25 ms latency with cached images and 3000 req/s at 30 ms without cache; and concurrency guarantees from Rust’s strict memory model that prevent data races and deadlocks, also benefiting third‑party libraries.
The rendering service enables many previously impossible ideas: it was quickly adopted by other businesses, such as Taobao’s full‑screen marketing platform for “Double 11” splash screens, Taobao App information‑feed ads after a 2021 redesign, external placement ads, and Alibaba International Station’s multilingual focus images, where the service supports complex layouts and languages, yielding a 35.68 % average business lift in A/B tests.
Additional use cases include combining intelligent copy with real‑time image composition for platforms like Toutiao and Xigua Video, and generating QR‑code posters for Taobao Alliance during major promotions without pre‑prepared materials.
The article concludes by reflecting on the imaginative drive that led from considering traditional scaling to building the real‑time rendering engine from scratch, highlighting how the technology not only empowered business but also deepened the team’s technical expertise.
Alimama Tech
Official Alimama tech channel, showcasing all of Alimama's technical innovations.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.