Scrivio Interview library
ScenarioAdvanced7 min read · updated 13 November 2026

A streaming platform broadcasts a live final to 4 million concurrent viewers. Ten minutes in, the CDN hit ratio for live manifests dropped, origin requests jumped from 20,000 to 900,000 per second, origins returned 503 errors and players stalled in several countries.

Why is live streaming harder on the CDN and origin than on-demand video, what likely caused this collapse, and how do you design live delivery to survive it?

Live is harder because the manifest changes every few seconds, so it can only be cached for a second or two, and every edge that misses at the same moment forwards to the origin; origin load then scales with edges and requests instead of staying near one fetch per update. A sudden hit-ratio drop like this usually comes from a cache key change, a wrong TTL or edges bypassing the shield. We survive it with an origin shield, request collapsing, stale-if-error, multi-region origins, multiple CDNs, and players that back off with jitter and drop quality.

Why this question is asked

On-demand video is a caching dream: segments never change and are requested millions of times. Live events break that comfort just when the audience is largest, and when it fails, millions of people notice at once. Interviewers ask this to see whether we understand how CDN caching actually works under a changing object, and whether we can debug a cache collapse from the numbers. In this answer, we will see why live manifests are hard to cache, read what the numbers in the incident tell us, find the likely triggers, and then design delivery that survives a final with 4 million viewers.

1A Quick Recap: Why Live Is Different From On-Demand

In live HLS or DASH, a packager cuts the incoming broadcast into segments of 2 to 6 seconds as it happens. The segments themselves are still immutable once written, so they cache well. The problem is the media playlist, the manifest that lists the latest segments. It changes every time a new segment is published, so every player must re-download it every few seconds to learn what to fetch next.

With 4 million viewers refreshing the manifest every 4 seconds, that is about 1 million manifest requests per second across the CDN. The CDN can only cache the manifest for a short time, roughly half a segment duration, or players would fall behind. So every edge server must refresh its copy from upstream every couple of seconds. In a healthy setup, each edge sends roughly one request per manifest update and serves thousands of players from it.

2Reading the Incident Numbers

Origin requests jumped from 20,000 to 900,000 per second while the audience stayed the same. 20,000 per second is consistent with a few thousand edge and shield servers each refreshing a handful of manifests every couple of seconds. 900,000 per second is close to the total player request rate. In other words, the CDN stopped absorbing manifest requests and started passing nearly every one through to the origin.

When many edges miss at the same moment, each forwards its own request. Without a shield tier and without request collapsing, origin load scales with the number of edges times the requests each receives during a miss, not with the number of manifest updates. The origins were sized for the cached case, so they returned 503, the players retried, and the retries added even more load: a classic retry storm.

Origin load with and without the CDN absorbing manifests
SituationOrigin requests per secondWhy
Healthy: shield plus collapsingabout 20,000one fetch per manifest update per shield node
Shield bypassededges x updatesevery edge refreshes from the origin itself
Cache key brokenabout 900,000every player request is a unique key, so all miss
Plus player retries on 503more than 900,000errors multiply requests

3What Likely Caused the Collapse

Something changed ten minutes in that made requests stop sharing cache entries. The most common culprit is the cache key, the parts of the request the CDN uses to decide whether two requests are the same object. If a player update or an ad-insertion system added a query parameter such as a session id or timestamp to manifest URLs, and the CDN includes the full query string in the key, every request becomes unique and every one misses.

Other triggers are a configuration push that set the manifest TTL to zero or made the origin send Cache-Control: no-cache, a change that made edges bypass the shield tier and go straight to origin, or a shield failover that left one region's edges talking to the origin directly. To find it, we compare the hit ratio per tier, edge and shield, before and after the drop, sample request URLs and the computed cache keys from both periods, and check the change log of the CDN configuration, the player and the packager at that minute. During the incident, the fastest fix is to revert the change, or to normalise the key at the edge by stripping the new parameter.

4Designing Live Delivery That Survives

The first protection is an origin shield: a middle tier of CDN servers between the thousands of edges and our origin. Edges fetch from the shield, and only the shield fetches from origin, so origin load depends on the number of shield nodes, perhaps tens, rather than thousands of edges.

The second is request collapsing, also called request coalescing: when 5,000 requests for the same manifest arrive at a node while its copy is expired, the node sends one request upstream and makes the other 4,999 wait for that response. Combined with the shield, the origin sees about one request per manifest update per shield node, regardless of audience size.

The third is serving slightly stale content on errors. With Cache-Control directives like stale-while-revalidate and stale-if-error, a node whose upstream returns 503 keeps serving the last good manifest for a few seconds. Players see a manifest that is one segment old, which costs a few seconds of latency but no stall, and the origin gets breathing room instead of a stampede.

Step throughLive delivery path
  1. Playersrefresh manifest every segment, back off with jitter on errors
  2. Multiple CDNs with steeringtraffic moves between providers on bad metrics
  3. Edge serversshort manifest TTL, long segment TTL, normalised cache key
  4. Origin shieldrequest collapsing, stale-if-error
  5. Origins and packagers in several regionsthe stream is replicated to each
  6. Contribution feedthe broadcast arrives over redundant links

6 layers, from the top down. Step through them one at a time.

5Redundancy Beyond One Region and One CDN

A big final should not depend on one origin location or one CDN provider. We send the contribution feed to packagers and origins in at least two regions, each producing identical segments with the same names and timing, so a player or the shield can switch between them without a glitch.

On the delivery side we use more than one CDN with traffic steering: a DNS or client-side decision that sends each viewer to the provider performing best for them, based on real measurements from players. If one provider's hit ratio collapses or its error rate rises in a country, steering shifts that country's viewers to another provider within a minute, so one provider's problem lowers margins instead of stopping playback.

6Players That Help Instead of Hurting

Players are part of the delivery system. On an error, a player must retry with exponential backoff and random jitter, so 4 million players do not retry at the same instant. It should first drop to a lower rendition, which needs fewer bytes, and lean on its buffer, rather than hammering the same failing URL. After repeated failures it should try the alternate CDN or origin listed in the manifest.

Finally, big events are rehearsed. We run synthetic load at the expected peak and above against the full path, including a forced failover of one CDN and one origin region, and we freeze changes to the CDN configuration, the player and the packager for the days around the event, because the most likely trigger of this incident was a change.

7Follow-up questions

Why not just cache the live manifest for longer, say 30 seconds?

Players would learn about new segments up to 30 seconds late and fall far behind the live edge, and some would request segments that have already left the playlist window. The manifest TTL has to be shorter than a segment duration, so we protect the origin with shields and collapsing instead of a longer TTL.

Does low-latency HLS make this worse?

Yes, in a sense. Low-latency modes publish partial segments every few hundred milliseconds and use blocking playlist requests, so manifest updates are more frequent and the CDN must support holding requests until the next update. Request collapsing and a shield become even more essential.

How would you have detected this before players stalled?

By alerting on the hit ratio per tier and the origin request rate per stream, not only on origin errors. A drop in manifest hit ratio from 99 percent to 80 percent is visible seconds after a bad change and long before the origin starts returning 503.

8Conclusion

In this answer, we saw that live streaming is hard on the CDN because manifests change every segment and can only be cached briefly, so simultaneous misses at many edges send origin load in proportion to edges and requests. The jump from 20,000 to 900,000 origin requests per second points at requests that stopped sharing cache entries, most likely a cache key change, a wrong TTL or bypassed shields. We designed delivery with an origin shield, request collapsing and stale-if-error, multi-region origins and multiple CDNs with steering, and players that back off with jitter and drop quality, all rehearsed at peak load before the event.

What to say in the interviewAbout 90 seconds aloud

Open with

Live is harder than on-demand because segments are still immutable but the manifest changes every 2 to 6 seconds, so it can only be cached for a second or two and every player refreshes it constantly.

Then, if they want more

If many edges miss at once and each forwards to the origin, origin load scales with the edges and requests instead of staying near one fetch per update. Going from 20,000 to 900,000 origin requests per second with the same audience means the CDN basically stopped caching manifests.

The likely triggers are a cache key change, like a new session or timestamp parameter, a bad TTL or no-cache header, or edges bypassing the shield. I would confirm by comparing hit ratio per tier and the cache keys before and after the drop, and roll back or strip the parameter at the edge.

For the design, I would put an origin shield between edges and origin, turn on request collapsing so one miss fetches while others wait, and allow stale-if-error so edges serve a slightly old manifest on 503s. I would run packagers and origins in several regions with the stream replicated, and use multiple CDNs with traffic steering.

Players should back off with jitter and drop rendition instead of retrying hard, and we would rehearse with synthetic peak load and freeze changes before the event.

About this answer

Last updated
13 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Why is live streaming harder on the CDN and origin than on-demand video, what likely...": https://scrivio-interview-library.netlify.app/architecture/system-design-problems/be87997a15/