× Install ThecoreGrid App
Tap below and select "Add to Home Screen" for full-screen experience.
B2B Engineering Insights & Architectural Teardowns

Distributed ad serving with low latency

Distributed ad serving is becoming a critical element of streaming platforms, where ad decisioning must fit within strict SLA requirements for latency and not disrupt playback.

In streaming systems, degradation begins when ad decisioning competes with the main video stream for the latency budget. JioHotstar describes a scenario where each ad request occurs right during playback — at pre-roll or mid-roll points. The request carries context: content metadata, user data, device, and available ad inventory. The issue is not with a single lookup, but with the orchestration of multiple services that must reach a consensus decision in less than 100 ms, even under peak loads such as live events. Any delay or partial failure directly impacts the user experience.

Architecturally, the system moves from simple ad selection to a multi-stage pipeline. JioHotstar employs waterfall tiering in combination with pacing algorithms (PID, SHALE). This is a trade-off between targeting accuracy and speed. Instead of processing thousands of candidates to reach a final decision, the system gradually narrows down the selection to a small set of ads for a 30-second ad pod. This approach reduces computational load and helps control campaign delivery, but adds complexity to orchestration and requires strict latency control at every stage.

Implementing distributed ad serving requires coordination across several domains: inventory management, decisioning, metadata, tracking, and analytics. Each component participates in the critical path of the request. This means that the failure of one service should not halt playback. Therefore, the architecture includes mechanisms for retry, graceful degradation, and handling partial availability. Caching becomes a mandatory element, but it is limited, as personalization depends on the current context. As a result, the system balances between data freshness and latency stability.

Additional complexity arises after ad delivery. The system must collect signals: impressions, engagement events, and transmit them to analytics pipelines. This is already an asynchronous part, but it affects the accuracy of campaigns and future decisioning steps. Here, it is important to separate synchronous and asynchronous paths so that analytics do not impact the latency of the user request.

From an industry perspective, the described architecture follows familiar patterns. The OpenRTB standard defines the protocol for interaction among participants in the advertising ecosystem, but real streaming platforms add their own personalization logic and business rules on top of it. This is a typical layer of differentiation, where companies optimize for their scenarios: content-aware targeting, user segments, and internal campaign constraints.

From an engineering standpoint, the key takeaway is that ad serving cannot be viewed as an API call. It is a distributed system with strict requirements for latency, throughput, and fault tolerance. High loads necessitate thoughtful caching and computational limitations. Meanwhile, business logic (targeting, pacing) is constantly becoming more complex, increasing the cognitive and operational load on the system.

What has changed as a result of implementing such an architecture — quantitative metrics from the source are not provided. However, the mere fact that decisioning fits within 100 ms under high competition for requests indicates optimization of the critical path. More importantly, the system maintains playback stability even during partial failures, which is the main SLA for streaming platforms.

In conclusion, distributed ad serving is a compromise solution between ad accuracy, response speed, and playback reliability. The architecture succeeds not through a single algorithm, but through the coordinated operation of multiple services and strict latency control at every stage.

Reference source

×

🚀 Deploy the Blocks

Controls: ← → to move, ↑ to rotate, ↓ to drop.
Mobile: use buttons below.