Backend Development 8 min read

Design of a Scalable Ad Placement System for Xianyu

The article describes a scalable placement system for Xianyu that links front‑end resource slots with multiple backend data sources via a visual‑schema‑driven API, enabling personalized banner and feed content, batch request optimization, rapid campaign management, and reduced developer effort while serving millions of users daily.

Xianyu Technology
Xianyu Technology
Xianyu Technology
Design of a Scalable Ad Placement System for Xianyu

Background: Xianyu is China’s largest second‑hand marketplace. With its massive user base, a single banner or feed card can be seen by tens of millions of users daily.

Need: To deliver personalized content and fine‑grained material placement, a system that can precisely reach users, allow rapid operational iteration, and reduce developers’ workload is essential.

Concept: Placement is similar to a billboard that changes per time, location, and audience. The system must provide an API to fetch the appropriate material, support various slot types (banner, feed, custom data), and handle different formats.

Detailed Design: The placement system acts as a bridge between front‑end resource slots and multiple backend data sources. It selects suitable data based on defined rules and returns it to the slot.

Resource Slot: Defined on the front end by developers; its required data structure is described by a JSON schema created via a visual editor.

Placement Material: Operations generate data through dynamic forms generated from the schema; this material is what the slot consumes.

Placement Unit: Connects a resource slot, material, and targeting factors such as time, audience, platform, and AB‑test configuration. When multiple units match, a weight or algorithm decides the final winner.

Placement Plan: Groups multiple slots for campaign management, simplifying large‑scale promotions.

Client Integration: An npm package allows front‑end code to request data by resourceId . To avoid a flood of concurrent requests, the SDK batches calls every 10 ms, reducing QPS at the cost of a ≤10 ms latency.

Effect: The system has been stable for over six months, serving millions of Xianyu users daily, improving slot utilization, lowering operational trial costs, and freeing developers from repetitive work.

Conclusion: This article outlines a lightweight placement system that connects front‑end slots with diverse backend sources, with future work focusing on data feedback loops and algorithmic optimization.

backendfrontendPerformancead placementDynamic FormsJSON Schemascalability
Xianyu Technology
Written by

Xianyu Technology

Official account of the Xianyu technology team

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.