Behind the Scenes: Evolving Netflix's Ads Event Pipeline for Live, Part II

Netflix's Ads Event Publisher used to enrich each client ad event by looking up metadata the ad server had written to a globally replicated key-value registry. For live events with tens of millions of concurrent viewers, that meant must-succeed database writes on the ad-serving critical path, a store that couldn't safely be scaled mid-event, and late events whenever lookups slowed. Netflix replaced it with an Apache Flink job: the ad server logs its responses to Kafka, and a custom KeyedCoProcessFunction joins them to client events over a 60-minute window, which catches roughly 99.999% of events. An hourly Spark job orchestrated by Maestro recovers the rest from the data warehouse. Revenue-bearing events are de-duplicated in local Flink state keyed by a hashed event ID. Both pipelines ran side by side with automated audits, and a stable per-event key moved publishing to Flink a slice at a time, region by region. When they agreed on well over 99.99% of events, Netflix retired the legacy service and the registry. In a load test, one AWS region handled an ad break at hundreds of thousands of events per second.

Published
2026-10-14
Scale
hundreds of thousands of events/sec for one ad break in a single AWS region (load test), ~99.999% of events joined within a 60-minute window, old and new pipelines agreed on well over 99.99% of events before cutover, 25,000+ Flink jobs run at Netflix
Techniques
streaming joins deduplication shadow traffic staged rollout zero downtime
Stack
Flink Kafka Spark Maestro

Try this stack yourself

  • Better Stack · Monitor uptime and logs with Better Stack, and get alerted fast if a migration or traffic spike goes sideways on your own system.
    Better Stack isn't part of Netflix's setup in this story. It's a tool for watching your own systems while you try ideas like these.

Some links above are affiliate links: if you sign up, How They Scaled may earn a commission at no extra cost to you. We only list tools that fit the stack in the story.

See also

The best scaling write-ups, weekly

One email a week. No spam.