<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Netflix TechBlog - Medium]]></title>
        <description><![CDATA[Learn about Netflix’s world class engineering efforts, company culture, product developments and more. - Medium]]></description>
        <link>https://netflixtechblog.com?source=rss----2615bd06b42e---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Netflix TechBlog - Medium</title>
            <link>https://netflixtechblog.com?source=rss----2615bd06b42e---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 10 Jun 2026 18:45:14 GMT</lastBuildDate>
        <atom:link href="https://netflixtechblog.com/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Dynamic Repartitioning for Time Series Workloads]]></title>
            <link>https://netflixtechblog.com/dynamically-splitting-wide-partitions-in-cassandra-for-time-series-workloads-0eded064f456?source=rss----2615bd06b42e---4</link>
            <guid isPermaLink="false">https://medium.com/p/0eded064f456</guid>
            <category><![CDATA[scalability]]></category>
            <category><![CDATA[cassandra]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[timeseries]]></category>
            <dc:creator><![CDATA[Netflix Technology Blog]]></dc:creator>
            <pubDate>Wed, 03 Jun 2026 02:05:05 GMT</pubDate>
            <atom:updated>2026-06-03T19:20:39.203Z</atom:updated>
            <content:encoded><![CDATA[<p>By <a href="https://www.linkedin.com/in/rajiv-shringi/">Rajiv Shringi</a>, <a href="https://www.linkedin.com/in/kaidanfullerton/">Kaidan Fullerton</a>, <a href="https://www.linkedin.com/in/oleksii-tkachuk-98b47375/">Oleksii Tkachuk</a> and <a href="https://www.linkedin.com/in/kartik894/">Kartik Sathyanarayanan</a></p><h3>Introduction</h3><p><a href="https://netflixtechblog.com/introducing-netflix-timeseries-data-abstraction-layer-31552f6326f8">Netflix’s TimeSeries Abstraction</a> is a scalable system for ingesting and querying petabytes of temporal event data with millisecond latency. We use <a href="https://cassandra.apache.org/_/index.html">Apache Cassandra</a> 4.x as the underlying storage for these main reasons:</p><ul><li><strong>Throughput, latency, and cost</strong>: Cassandra can handle millions of low‑latency reads and writes in a cost-effective manner.</li><li><strong>Operational maturity</strong>: Our data platform team has deep operational expertise running large Cassandra clusters in production.</li></ul><p>However, using Cassandra at this scale introduces trade‑offs for TimeSeries workloads. A key challenge is <a href="https://docs.datastax.com/en/cql/hcd/data-modeling/best-practices.html#bucketing">wide partitions</a>, as TimeSeries dataset partitions can grow quite large with events accumulating over time.</p><p>This problem is further compounded by the fact that TimeSeries servers routinely deal with a very high read throughput:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0l0prhKlcOjf-d3-JVQTJg.png" /><figcaption>Reads/second for different datasets</figcaption></figure><p>This post walks through our journey to reduce the impact of wide partitions in our TimeSeries datasets, the solutions we built, and the lessons we learned.</p><blockquote>Note: Although this post walks through re-partitioning in Cassandra, the same techniques can be applied more broadly to other data stores.</blockquote><h3>Impact of Wide Partitions</h3><p>For most of our datasets, we observe an average read latency in the order of single-digit milliseconds:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sAc4HAMIvLcKTlt9NqOmjQ.png" /><figcaption>Ideal Latency for Reads (ms)</figcaption></figure><p>However, in some datasets, as partitions grow too wide, we observe high read latencies in the order of seconds, especially towards the tail end:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uvqa9oj0P6uT-G27WPRJoA.png" /><figcaption>High Tail Latency for Reads (seconds)</figcaption></figure><p>This can result in timeouts:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gcmGxn6NdjRuy0HYQIDv9g.png" /><figcaption>Read timeouts / second</figcaption></figure><p>In extreme cases, if most of the reads target wide partitions, we can see Garbage Collection pauses, high CPU utilization and thread queueing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lj0yVnacUHcE1RQ7iHRKVA.png" /><figcaption>High CPU utilization and thread-queueing in Cassandra clusters</figcaption></figure><p>Scaling up the underlying Cassandra cluster is always an option, but we need smarter alternatives than just throwing more money at the problem.</p><h3>TimeSeries Partitioning Strategy</h3><p>The TimeSeries Abstraction was designed to solve the problem of wide partitions by dividing the data into discrete time chunks. For more in-depth information, refer to our previous <a href="https://netflixtechblog.com/introducing-netflix-timeseries-data-abstraction-layer-31552f6326f8">blog</a>.</p><p>To summarize, here is an illustration of how TimeSeries partitioning strategy helps us break up wide partitions into manageable chunks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ySI9hOE4_lSScqQ16KQAuw.png" /><figcaption>Time Series partitioning breaking up a dataset into Time slices, time buckets and event buckets</figcaption></figure><p>This strategy further allows us to efficiently query and drop data based on time, without having to deal with <a href="https://opencredo.com/blogs/cassandra-tombstones-common-issues">tombstones</a>.</p><h3>Picking the Partitioning Strategy</h3><p>When a namespace (a.k.a. dataset) is created, users must specify their anticipated workload characteristics. This specification is then fed into our <a href="https://github.com/Netflix-Skunkworks/service-capacity-modeling/blob/main/service_capacity_modeling/models/org/netflix/time_series.py">provisioning</a> pipeline. The pipeline processes these inputs, runs <a href="https://en.wikipedia.org/wiki/Monte_Carlo_method">Monte Carlo</a> simulations, and produces an optimal infrastructure and partition configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*016OPfeTjQnGXnUSGdTIKA.png" /><figcaption>Provisioning picks optimal infra and configuration based on user inputs</figcaption></figure><p>You can learn more about our methodology of capacity planning in this insightful <a href="https://www.youtube.com/watch?v=Lf6B1PxIvAs">AWS re:Invent</a> talk given by one of our stunning colleagues.</p><h3>The Problem with the Current Approach</h3><p>Although this method of provisioning is effective in many situations, it proves insufficient for TimeSeries workloads under these conditions:</p><ul><li><strong>Workload is unknown or inaccurately estimated:</strong> Early on in a project, users can lack a reliable picture of production traffic or simply misestimate key parameters.</li><li><strong>Workload evolves over time:</strong> Traffic patterns, client behavior, and product requirements change. A “good” partitioning strategy on day one can become inefficient months later.</li><li><strong>Data outliers exist:</strong> Not all TimeSeries IDs behave the same. A small percentage of IDs can receive a vastly higher volume of events than the rest.</li></ul><p>Fortunately, our design with discrete Time Slices gives us a natural escape hatch for the first two scenarios; each new Time Slice can use a different partitioning strategy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F2gUdVv8NGAqoYbmFVMbnQ.png" /><figcaption>Each Time Slice can have a unique partition strategy</figcaption></figure><p>However, manually adjusting these configurations in a fleet that has thousands of TimeSeries datasets is not sustainable. We need automation.</p><h3>Solution 1: Time Slice Re-Partitioning</h3><p>Cassandra exposes useful introspection APIs for understanding data usage and access patterns. For example, <a href="https://docs.datastax.com/en/dse/6.9/managing/tools/nodetool/table-histograms.html">nodetool tablehistograms</a> provide percentile distributions for partition sizes in a table. Using these tools, we can detect cases of both over and under partitioning.</p><p>Below is an example of over‑partitioning, where the TimeSeries provisioning pipeline selected very small <em>time_bucket</em> intervals based on user provided inputs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*yCT6SVX5682twAp2VhLPJg.png" /><figcaption>Provisioning selected 60s time buckets based on user inputs</figcaption></figure><p>causing partitions to have less than 10 KB of data, leading to high read amplification and thread queueing:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*XM-yySVKVu1YTyt9uPOk-w.png" /><figcaption>Histogram of the given Cassandra table showing partition size percentiles</figcaption></figure><p>In order to tune partition strategies efficiently, we added a background worker, which monitors partition histograms of Time Slices attached to a given application, and exposes it via a Cassandra virtual table:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZMZ1RYb52fha32uStM7w9A.png" /><figcaption>Histograms exposed through a Cassandra Virtual table</figcaption></figure><p>It then computes an adjustment factor when it detects partition sizes not meeting a configured density. This configured density is often set between 2 MiB to 10 MiB depending on the workload.</p><pre>DynamicTimeSliceConfigWorker: <br>namespace: my_dataset_1<br>Observed: TimeSlices have p99 partitions below configured target of 10MB. <br>Proposed: time_bucket interval: 60s -&gt; 604800s</pre><p>The worker can then update <em>future</em> Time Slices with the new partition strategy:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*HUAyyJeONB-5HVnMihAx8g.png" /><figcaption>Partitioning adjusted for future Time Slice(s)</figcaption></figure><p>This strategy has yielded real results in reducing our read latencies, as well as reducing the number of timeouts caused by thread queueing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tE44f8HSDXCwvlffOq0w4A.png" /><figcaption>Reduction in tail latency and thread queueing for</figcaption></figure><p>However, this strategy only works if most of the data exhibits such behavior that warrants re-partitioning of the entire table. It does not work in cases where only a percentage of IDs within the table are wide.</p><p>We have a couple of options here:</p><ul><li><strong>Do Nothing</strong>: This is sometimes the right approach if there is no observed impact to the application’s top-level metrics.</li><li><strong>Partial Returns</strong>: We implemented a ‘Partial Return’ feature, which aborts an inflight request if it has breached a configured latency SLO, while returning whatever data it has collected up until that point. This is a great option for clients who care more about latency than fetching <em>all</em> the data.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t7cz4h3Ebxg-HDyaMVIp_g.png" /><figcaption>Tail latency drops around the SLO cutoff as Partial Returns are enabled</figcaption></figure><ul><li><strong>Block IDs:</strong> This is an extreme step but worth mentioning, because we do deal with bad data that occasionally seeps into the system e.g. test or spam IDs that can make the system unstable.</li></ul><pre>dgwts.config.&lt;dataset&gt;.block.Ids: &quot;&lt;tsid-1&gt;, &lt;tsid-2&gt;, &lt;tsid-3&gt;&quot;</pre><p>Ultimately, we encounter scenarios where valid and important TimeSeries IDs accumulate a high enough volume of events, with callers needing to process all the related data. Simply tolerating elevated latencies or timeouts when querying these IDs is not a desirable outcome.</p><p>This is where dynamic partitioning comes into play.</p><h3>Solution 2: Dynamic Partitioning per ID</h3><p>Dynamic partitioning is an asynchronous pipeline that auto-detects and splits wide partitions on a TimeSeries ID level rather than at the table level.</p><p>It has three main stages:</p><ul><li><strong>Detection</strong>: Detects wide partitions for a given TimeSeries ID during the read path.</li><li><strong>Planning &amp; Splitting</strong>: Plans and executes splits of those partitions into optimal sizes asynchronously.</li><li><strong>Serving Reads</strong>: Re-routes the read queries transparently to read data from the split partitions when ready.</li></ul><p>This is how it works at a high level; we will dive into details after:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tucaTmgbj6BqhA8YKmUn9A.png" /><figcaption>Dynamic Wide Partition Split Async Pipeline</figcaption></figure><p>Here are the different stages of the pipeline:</p><h4>Detection</h4><p>Every TimeSeries read operation tracks how many bytes are read for a given partition. If the bytes read exceed a configured threshold, the server emits a detection event to Kafka:</p><pre>{<br>  &quot;time_slice&quot;: &quot;data_20260328&quot;, // the Cassandra table this event was detected in<br>  &quot;time_series_id&quot;: &quot;profileId:123&quot;, // the ID detected as wide<br>  &quot;time_bucket&quot;: 7, // the existing time_bucket partition<br>  &quot;event_bucket&quot;: 2, // the existing event_bucket partition<br>  &quot;immutable&quot;: true, // TimeSeries servers can compute if this partition is no longer receiving writes<br>  &quot;version&quot;: &quot;0&quot; // reserved for future use e.g. invalidate if partition is no longer immutable<br>}</pre><p>Our decision to detect wide partitions on reads, as opposed to writes, is based on our observation that the majority of the data in the wild doesn’t need this treatment. The slight downside is that some reads on these large partitions may suffer sub-optimal performance for a very short duration (typically seconds) until this process catches up.</p><h4>Immutability</h4><p>Although splitting mutable partitions is possible, it is inherently more complex. As a first step towards solving this problem, we chose to reduce the surface area of this change by focusing on immutable partitions, while still meaningfully reducing caller timeouts.</p><h4>Planning</h4><p>Detection may occur based on a partial read, so the planner must still read the entire partition <em>once</em> to compute an accurate split plan. The checkpointing becomes crucial here. For planning reads that fail to process the entire partition, the process can always continue from the last saved checkpoint.</p><h4>Checkpointing</h4><p>The <em>wide_row</em> metadata table serves as the backbone for state transitions and checkpointing of partition splits. It also stores information that is used later by TimeSeries servers to properly route Read queries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MNIBbz9hTPz-7ah8FRqTZQ.png" /><figcaption>wide_row metadata for storing split states and checkpoints</figcaption></figure><h4>Splitting</h4><p>The Planner delegates the splitting of data to an appropriate split-strategy. For example, if <em>EventBucketPartitionSplitStrategy</em> is selected, we split the partition by assigning more event buckets to the same time bucket. If the partition is <em>ultra-wide</em>, we cap the number of event buckets we split into, in order to control the resultant read amplification. Spreading into multiple partitions in such cases is still beneficial in order to spread the read workload to multiple Cassandra replicas.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Acbtr-hKcuopZ_7tXpWoxQ.png" /><figcaption>Split by assigning more event buckets for a given time bucket</figcaption></figure><p>Further, since the Splitter has the full view of the partition, it can ensure total sort order across all the split buckets.</p><h4>Validating Splits</h4><p>The Planner stores a pre-split checksum of a given partition during the planning phase, while the Splitter computes and stores the post-split checksum. The split status is marked as completed only if the two checksums match.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*BbADzQfFTZPWUbpORlXfGQ.png" /><figcaption>Ensure checksums match pre- and post-split before marking a split as COMPLETED</figcaption></figure><h4>Tracking Splits</h4><p>The pre- and post-split partition sizes across different datasets are tracked to see how effectively the partition splits are being planned and executed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tif_TQsk2OkBV9CCWrfDJQ.png" /><figcaption>Track pre- and post-split partition sizes to ensure we are splitting optimally</figcaption></figure><h4>Serving Reads</h4><p>The TimeSeries servers load the partition-keys of completed splits periodically into in-memory Bloom filters. Every read operation checks the Bloom filter to see whether a query can be diverted to the split partitions.</p><p>Here is what the Read path looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1WeYb1fTJq8-nkkMr-RjzQ.png" /><figcaption>Read path for diverting reads to existing or split partitions</figcaption></figure><p>The size of the Bloom filters is monitored to ensure we have enough memory per server. Due to the compactness of partition keys, and ratio of wide partitions in a given dataset, the filters fit comfortably in each server instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*73ahHVoNRUYaczuEn9KTBA.png" /><figcaption>Bloom filter approximate element count per namespace and time slice</figcaption></figure><p>The Bloom filter latency to check whether a given partition key is wide for every read request is typically in single-digit microseconds or better, making this diversion practically invisible to the callers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t1ZASboghIXdGDyHrz0Z0Q.png" /><figcaption>Latency for checking Bloom filters is extremely small for callers to notice the diversion</figcaption></figure><p>For the cases that do end up with a Bloom filter hit, the TimeSeries servers lookup the <em>wide_row</em> metadata to see how to read a specific wide partition:</p><pre>{<br>  &quot;pre_split_data&quot;: {<br>    &quot;time_slice&quot;: &quot;data_20260328&quot;,<br>    &quot;time_series_id&quot;: &quot;6313825&quot;, → What to read<br>    &quot;time_bucket&quot;: 0,<br>    &quot;event_bucket&quot;: 2<br>    …<br>  },<br>  &quot;post_split_data&quot;: {<br>    &quot;time_slice&quot;: &quot;wide_data_20260328_0&quot;, → Where to read it from<br>    &quot;event_bucket_partition_strategy&quot;: { → Strategy to delegate to for reading<br>    &quot;target_event_buckets&quot;: 2,<br>    &quot;start_event_bucket&quot;: 32 → How should the strategy read it<br>  }<br>  …<br>}</pre><p>This metadata read is backed by a read-through cache, making it quite performant:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CprO4zk8UQFYulId8jHdUg.png" /><figcaption>Metadata fetch latency is quite low to affect read operations</figcaption></figure><p>Finally, the reads for the split partitions are delegated to our existing <em>PartitionReader</em>, which reads <em>N smaller partitions in parallel</em>, rather than 1 large partition, improving overall performance and stability!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CHPEUf2WlJzHyUGdNiEA3A.png" /><figcaption>Read much smaller partitions in parallel and merge results</figcaption></figure><h4>Fallbacks</h4><p>The existing wide partition from the original time slice is never deleted. This helps us in creating safe fallbacks in many different scenarios of partial failures and eventual consistency. The slightly larger storage space we use as a result is worth the operational safety we gain.</p><h4>Building Additional Confidence</h4><p>Serving incorrect reads would be disastrous. To establish trust beyond checksums, we leveraged additional mechanisms such as:</p><ul><li>Using our existing <a href="https://netflixtechblog.medium.com/data-bridge-how-netflix-simplifies-data-movement-36d10d91c313">Data Bridge</a> pipelines to verify splits offline:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AspDR7sF38JxFXTkaK1wWQ.png" /><figcaption>Spark job to ensure that the split data is an exact match to the original data</figcaption></figure><ul><li>Implementing a phased rollout strategy to safely advance through stages as our confidence in the system grew:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*la6WvWA4KWUglIPWpG27qw.png" /><figcaption>Advance through Read modes once previous mode passes checks</figcaption></figure><p>A critical part of this phased rollout was the <strong>Comparison</strong> phase, which compared bytes served by old read path and the new read path while in <em>shadow</em> mode:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sELeFr6fngTGib_gcD2ejA.png" /><figcaption>A chart of bytes match vs bytes differ in a given shadow period</figcaption></figure><h4>Results</h4><p>As a result of these dynamic splits, we see a huge improvement in the average read latency of most wide partitions, bringing it down from seconds:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AZuNdkiqBRtlcLhJBC-MzA.png" /><figcaption>Existing average latency for reading wide partitions</figcaption></figure><p>to <em>low double-digit milliseconds!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y8H7tjqj-g2-ZRGPBkUl_A.png" /><figcaption>Average latency for reading dynamically split partitions</figcaption></figure><p>Tail latencies of reading wide partitions dropped from several seconds:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JbNIJYjARHjGJH77-FiV7w.png" /><figcaption>Existing tail latency for reading wide partitions</figcaption></figure><p>to around 200 ms or better:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qKneKuGrpiU0VoMRw7OOZQ.png" /><figcaption>Tail latency for reading dynamically split partitions</figcaption></figure><p>resulting in a drop in read timeouts:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UjFSHe5HeZeDBKbmayLdnw.png" /></figure><p>Overall, this has resulted in a more stable Cassandra cluster with lower CPU utilization and little to no thread queuing:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wt_oTudRIz8XKmJ5N3FcDA.png" /><figcaption>Low CPU utilization and no thread-queueing</figcaption></figure><p>Further, for extreme wide rows, where a dataset would face constant timeouts and unavailability blips, the service was able to paginate and query 500MB+ partitions while remaining available:</p><pre>grpc … com.netflix.dgw.ts.TimeSeriesService/SearchEventRecords -d<br>&#39;{&quot;namespace&quot;: &quot;...&quot;,<br>    &quot;search_query&quot;: {...},<br>    &quot;time_interval&quot;: {<br>      &quot;start&quot;: &quot;2026–05–11T23:42:51.484398Z&quot;,<br>      &quot;end&quot;: &quot;2026–05–12T00:13:50.694205Z&quot;<br>    },<br>    &quot;pageSize&quot; : 1000,<br>  }&#39;<br># Response:<br>{<br>  &quot;next_page_token&quot; : ….,<br>  &quot;records&quot;: [<br>    {<br>      …<br>    }<br>  ],<br>  &quot;response_context&quot;: [{<br>    &quot;namespace&quot;: &quot;...&quot;,<br>    …<br>    # Trades elevated latency for being available<br>    &quot;time_taken&quot;: &quot;41.072410142s&quot;<br>    }<br>  ]<br>}</pre><h3>Conclusion</h3><p>There is more work planned around this feature, like splitting <em>mutable</em> wide partitions, or re-processing previously failed splits, but this has been a successful start in improving service performance and reducing our support burden.</p><p>Further, we would like to highlight some key lessons that we learned at different points in this journey.</p><ul><li><strong>Reducing Surface Area: </strong>As a first step, explore simpler solutions that can still deliver meaningful impact. Also, reducing the surface area of a complex change and deploying incrementally pays off operationally.</li><li><strong>Building Confidence</strong>: Invest time and resources to build confidence in new features, especially when justified by the feature complexity, deployment blast radius, and/or potential impact.</li></ul><p><strong>Acknowledgements</strong>: Special thanks to our stunning colleagues who further contributed to this feature’s success: <a href="https://www.linkedin.com/in/tomdevoe/">Tom DeVoe</a>, <a href="https://www.linkedin.com/in/clohfink/">Chris Lohfink</a>, <a href="https://www.linkedin.com/in/sumanth-pasupuleti/">Sumanth Pasupuleti</a> and <a href="https://www.linkedin.com/in/joseph-lynch-9976a431/">Joey Lynch</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0eded064f456" width="1" height="1" alt=""><hr><p><a href="https://netflixtechblog.com/dynamically-splitting-wide-partitions-in-cassandra-for-time-series-workloads-0eded064f456">Dynamic Repartitioning for Time Series Workloads</a> was originally published in <a href="https://netflixtechblog.com">Netflix TechBlog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[High-Throughput Graph Abstraction at Netflix: Part I]]></title>
            <link>https://netflixtechblog.com/high-throughput-graph-abstraction-at-netflix-part-i-e88063e6f6d5?source=rss----2615bd06b42e---4</link>
            <guid isPermaLink="false">https://medium.com/p/e88063e6f6d5</guid>
            <category><![CDATA[stateful-systems]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[caching]]></category>
            <category><![CDATA[scalability]]></category>
            <category><![CDATA[graph-database]]></category>
            <dc:creator><![CDATA[Netflix Technology Blog]]></dc:creator>
            <pubDate>Fri, 29 May 2026 18:49:13 GMT</pubDate>
            <atom:updated>2026-05-29T18:49:12.637Z</atom:updated>
            <content:encoded><![CDATA[<p>By <a href="https://www.linkedin.com/in/oleksii-tkachuk-98b47375/">Oleksii Tkachuk</a>, <a href="https://www.linkedin.com/in/kartik894/">Kartik Sathyanarayanan</a>, <a href="https://www.linkedin.com/in/rajiv-shringi/">Rajiv Shringi</a></p><h3>Introduction</h3><p>Netflix has a diverse range of graph use cases, each serving specific business needs with unique functionality and performance requirements. These use cases fall into two broad categories:</p><ol><li><strong>OLAP</strong>: These use cases typically involve open-ended and algorithmic exploration of large graph datasets. They often utilize industry-standard models and languages such as RDF with SPARQL, Property Graphs with Gremlin or openCypher, and even SQL. The primary focus in these situations is in-depth analysis, rather than achieving high throughput and low latency.</li><li><strong>OLTP</strong>: These use cases require extremely high throughput — up to millions of operations per second — while delivering traversal results within milliseconds. Achieving such a level of performance often requires making trade-offs, which can include accepting eventual consistency or restricting query complexity. For example, the service can demand a specified starting point for traversals and enforce a maximum traversal depth. Such use cases are often directly tied to streaming or user experiences and demand high global availability.</li></ol><p>Netflix’s Graph Abstraction was designed specifically for this second category of use cases. As of this writing, the abstraction is handling close to 10 million operations per second across 650 TB of graph datasets with low latency and cost efficiency.</p><p>This post is the first in a multi-part series that explores the Graph Abstraction architecture in depth. We’ll cover how the abstraction indexes data for real-time and historical views, manages strongly typed graphs, performs efficient traversals, and integrates with the Netflix Big Data ecosystem.</p><h3>Usage at Netflix</h3><p>From a business standpoint, the primary driver for developing the Graph Abstraction was internal demand for supporting several key use cases:</p><ul><li><strong>Real-Time Distributed Graph (RDG)</strong>: A graph capturing dynamic relationships across entities and interactions throughout the Netflix ecosystem. You can learn more about the initial RDG implementation in this insightful <a href="https://netflixtechblog.medium.com/how-and-why-netflix-built-a-real-time-distributed-graph-part-2-building-a-scalable-storage-layer-ff4a8dbd3d1f">blog post</a>. This functionality has since been integrated into the Graph Abstraction.</li><li><strong>Social Graph</strong>: A graph of social connections within Netflix Gaming, designed to boost user engagement.</li><li><a href="https://netflixtechblog.com/from-silos-to-service-topology-why-netflix-built-a-real-time-service-map-0165ba13a7bc"><strong>Service Topology</strong></a>: A graph of all internal Netflix services, used for real-time and historical analysis to improve root cause analysis during incidents.</li></ul><p>Let’s examine the overall architecture of the Graph Abstraction and how it integrates with the Netflix Online Datastore ecosystem.</p><h3>Architecture</h3><p>Instead of building the persistence and caching layers from scratch, we chose to build taller on top of existing Netflix data abstractions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6XXQ786vx4AwImVynUAU6A.png" /></figure><p>The <a href="https://netflixtechblog.com/introducing-netflixs-key-value-data-abstraction-layer-1ea8a0a11b30">Key-Value (KV) Abstraction</a> stores the latest view of nodes and edges, serving as the real-time index for all queries. Optionally, users can plug-in the <a href="https://netflixtechblog.com/introducing-netflix-timeseries-data-abstraction-layer-31552f6326f8">TimeSeries (TS) Abstraction</a> if they are interested in a historical view of how the graph evolves over time. Additionally, we use <a href="https://netflixtechblog.com/announcing-evcache-distributed-in-memory-datastore-for-cloud-c26a698c27f7">EVCache</a> to achieve low-millisecond latencies and are actively experimenting with more specialized caching layers to further improve performance. Finally, the Graph Abstraction integrates with the <a href="https://netflixtechblog.medium.com/data-gateway-a-platform-for-growing-and-protecting-the-data-tier-f1ed8db8f5c6">Data Gateway Control Plane</a> to manage graph schemas and automate the provisioning, deletion, and configuration of datasets in both KV and TS.</p><h3>Property Graph Model</h3><p>The Abstraction uses the <a href="https://en.wikipedia.org/wiki/Property_graph">Property Graph</a> model to store its data. The graph consists of nodes and edges of various types, each with associated properties. These properties are strongly typed to enable efficient filtering and ensure consistent data exports. For semantic reasons, edges can be either unidirectional or bidirectional.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F9XX6m8w1csTP0erZrS8sQ.png" /></figure><h3>Namespaces</h3><p>The Abstraction separates data into isolated units called “namespaces.” Each namespace is associated with a physical storage layer, as configured in the Data Gateway Control Plane, and can be deployed on either dedicated or shared hardware. The optimal, most cost-effective hardware configuration is determined by our <a href="https://github.com/Netflix-Skunkworks/service-capacity-modeling">provisioning automation</a>, based on user-provided requirements such as throughput, latency, dataset size, and workload criticality. For more details on this topic, see this <a href="https://www.youtube.com/watch?v=Lf6B1PxIvAs">talk</a> given by our stunning colleague Joey Lynch at <strong>AWS re:Invent</strong>.</p><h3>Graph Schema</h3><p>Each namespace is further associated with an explicit graph schema configured in the Control Plane. The graph schema defines node and edge types, allowed properties, permitted relationships, and directions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_w_kbWs-XaIS5dAjgRpxDw.png" /></figure><p>The Graph schema is implemented as a collection of edge mappings that describe the nature of the relationship between given node types.</p><pre>{<br>  &quot;edgeConfig&quot;: {<br>    &quot;edgeMappings&quot;: [<br>      {<br>        &quot;edgeMappingKey&quot;: {<br>          &quot;fromNodeType&quot;: &quot;account&quot;,<br>          &quot;edgeType&quot;: &quot;owns&quot;,<br>          &quot;toNodeType&quot;: &quot;profile&quot;<br>        },<br>        &quot;directionType&quot;: &quot;UNIDIRECTIONAL&quot;<br>      },<br>      {<br>        &quot;edgeMappingKey&quot;: {<br>          &quot;fromNodeType&quot;: &quot;profile&quot;,<br>          &quot;edgeType&quot;: &quot;linked_to&quot;,<br>          &quot;toNodeType&quot;: &quot;device&quot;<br>        },<br>        &quot;directionType&quot;: &quot;BIDIRECTIONAL&quot;<br>      }<br>    ]<br>  }<br>}</pre><p>Edge mappings are further extended with specification of property schema that consists of allowed property names and their type specification:</p><pre>{<br>   &quot;edgeMappingKey&quot;:{<br>      &quot;fromNodeType&quot;:&quot;profile&quot;,<br>      &quot;edgeType&quot;:&quot;linked_to&quot;,<br>      &quot;toNodeType&quot;:&quot;device&quot;<br>   },<br>   &quot;propertySchema&quot;:{<br>      &quot;propertyMappings&quot;:[<br>         { &quot;propertyKey&quot;:&quot;registration_time&quot;, &quot;propertyValueType&quot;:&quot;TIMESTAMP&quot; },<br>         { &quot;propertyKey&quot;:&quot;status&quot;, &quot;propertyValueType&quot;:&quot;STRING&quot; }<br>      ]<br>   }<br>}</pre><p>The Abstraction servers load this schema on startup and build an<em> in-memory metadata graph</em> of possible relationships, enabling several key optimizations:</p><ul><li><strong>Data Quality:</strong> The Abstraction rejects non-conforming nodes, edges, and properties during writes, ensuring high data quality and consistent exports.</li><li><strong>Query Planning:</strong> The Abstraction uses the schema to quickly construct the possible traversal paths the service should take to answer a given user query.</li><li><strong>Deduplication of Traversed Edges:</strong> For bidirectional traversals on edges between the same node type, the schema helps avoid redundant processing by deduplicating traversed paths.</li><li><strong>Eliminating Traversal paths:</strong> For a given user query, the Abstraction removes traversal paths associated with impossible relationships, as well as those where filters or property types are incompatible.</li></ul><p>Further, the Abstraction servers periodically poll the schema from the Data Gateway Control Plane in order to keep it updated with user changes. Looking ahead, we plan to leverage the graph schema for additional improvements, such as:</p><ul><li><strong>Minimizing Query Fanout:</strong> By using edge cardinality within edge mappings, we aim to select the most efficient traversal paths and minimize query fanout.</li><li><strong>Improved Developer Experience:</strong> The schema will support generating a type-safe data access layer and enhance the Gremlin-like API with schema awareness.</li></ul><p>Next, let’s look at how this data is organized in a real-time index within the KV Abstraction.</p><h3>Real-Time Index: Key-Value Storage</h3><p>Before we discuss how the data is organized into graph indexes, let’s discuss how KV organizes data within namespaces and provides idempotency guarantees:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MYU0GIxQFzZ_BTKCSEeThw.png" /></figure><ul><li><strong>Data partitioning: </strong>A namespace is associated with a table in the underlying storage layer. Within the table, data is partitioned into records by unique IDs, with each record holding multiple sorted items as key-value pairs. This structure effectively makes each namespace a map of sorted maps, providing flexibility for diverse access patterns.</li><li><strong>Idempotency</strong>: Writes to a given ID and key are <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">idempotent</a>, enabling <a href="https://grpc.io/docs/guides/request-hedging/">request hedging</a> and safe retries. The idempotency token contains a timestamp, which KV uses to enforce Last-Write-Wins (LWW) semantics at the storage layer.</li></ul><p>We use the KV as the underlying storage for all real-time graph indices on nodes and edges. For more on Netflix’s Key-Value Abstraction, see this excellent <a href="https://netflixtechblog.com/introducing-netflixs-key-value-data-abstraction-layer-1ea8a0a11b30">post</a> published by our KeyValue team.</p><h3>Node Storage</h3><p>The two-tiered partitioning strategy works well for node storage. Each node type is isolated within its own KV namespace, which stores all the properties for nodes of that type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Fc1-LHALWVO-8G-Z8RSVA.png" /></figure><p>This storage format enables several efficient access patterns for nodes:</p><ul><li><strong>Efficient reads</strong>: A given node and all its properties are fetched in a single partition lookup, achieving single-digit millisecond latency.</li><li><strong>Property selection pushdown</strong>: Target property keys are pushed down to the KV layer, reducing the amount of data fetched and further decreasing latencies and network overhead.</li><li><strong>Property filtering pushdown</strong>: Property keys and values can be efficiently filtered at the KV layer.</li><li><strong>Efficient exports</strong>: This model supports highly parallelized node exports by node type.</li></ul><h3>Edge Storage</h3><h4>Links and Property Index</h4><p>Edges utilize two distinct types of indexes: one exclusively for the edge connections (links), and one for edge properties.</p><p>The Edge links are arranged as an adjacency list mapping source nodes to their connected neighbors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_euxbuVK9wmitubG1UUG9g.png" /></figure><p>The Edge Property index stores information about properties of every edge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2d3gRUTmEW7M5swL1jRKcA.png" /></figure><p>Separating edge links from their properties brings several benefits, but also introduces a key trade-off:</p><p><strong>Benefits:</strong></p><ul><li><strong>Efficient property upserts:</strong> Allows individual properties to be upserted over time without needing to read the entire property set for an edge.</li><li><strong>Wide row prevention:</strong> Decoupling edge links from their properties prevents large partitions in databases like Cassandra, enabling efficient storage and low-latency reads — even for edges with millions of connections.</li></ul><p><strong>Trade-off:</strong></p><ul><li><strong>Non-atomic writes:</strong> Storing edges across multiple namespaces means that writes across these namespaces are not atomic. We’ll discuss how this is addressed in the Consistency Enforcement section.</li></ul><h4>Forward and Reverse Indexes</h4><p>Additionally, edge indexes are separated into forward and reverse indexes to support traversals in either direction. The illustration below shows an example of the reverse index counterpart for the links namespace shown above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vg_5v9wNhi0h9wU1y6zthg.png" /></figure><p>To ensure consistent record identifiers when updating edge properties in either direction, the Abstraction lexicographically sorts and concatenates the source and destination node IDs to create a <em>direction-agnostic identifier </em>for property storage. This ensures that properties can be accessed or mutated in a single database call regardless of the direction specified in the request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MF15NbNtvcymomLlJlY7Nw.png" /></figure><p>This storage format enables several efficient access patterns:</p><ul><li><strong>Point Reads</strong>: Given an edge id, all properties can be fetched in a single partition lookup on the properties index.</li><li><strong>Range Reads</strong>: Given a source node, a range read on a partition in the links index can efficiently return all edges. Depending on the desired direction, the Abstraction can target the forward or reverse index.</li><li><strong>Property Filtering</strong>: Properties are fetched only for the links that match the record or page limit criteria, minimizing the data exchanged over the network.</li><li><strong>Sort Orders</strong>: By default, edge links are sorted lexicographically by their target node. To support fetching the latest connections, the Abstraction retrieves target edge links in memory, sorts them by their last-write time, and returns the results. In order to ensure optimal performance without exerting too much memory pressure, we aim to limit the number of edges per source node within the system.</li></ul><p>Next, let’s explore the caching strategies used by the Abstraction.</p><h3>Caching Strategies in Graph Abstraction</h3><p>Although the Graph Abstraction already provides efficient reads and writes to durable storage, caching remains critical for the stability and performance of any graph datastore for two key reasons:</p><ul><li><strong>Write amplification</strong>: A single write on the fronting service can result in multiple writes to the backing durable storage due to the use of multiple indexes. Whenever possible, it’s best to avoid unnecessary writes — for example, by not writing an edge link that already exists.</li><li><strong>Read amplification</strong>: A single traversal request on the fronting service may translate into thousands of fetch operations on the backend, especially for highly interconnected graphs.</li></ul><p>To address these challenges, the Graph Abstraction employs two distinct caching strategies.</p><h4>Write-aside Caching of Edge Links</h4><p>An edge link contains no additional information beyond the link itself and its last-write timestamp. To reduce write amplification on durable storage, we cache edge links for short durations, helping to avoid writing a link that already exists. This mechanism is balanced with configurable TTL windows, cache invalidation on deletes, and lease acquisitions with exponential backoff. These strategies provide the necessary consistency guarantees while still allowing the last-write timestamp to be refreshed according to the predefined staleness.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KgtOewuSORVYngTAmHOz3w.png" /></figure><h4>Read-aside Caching of Properties</h4><p>To reduce read amplification on the durable store, the Graph Abstraction leverages KV’s integration with EVCache. Multiple KV namespaces can share the same caching clusters for cost efficiency. The Abstraction first fetches data from durable storage, while subsequent reads are served from the cache. Caching is applied at both the record and item levels, benefiting all graph objects.</p><p>Graph Abstraction employs two invalidation strategies, selected based on write throughput and consistency requirements:</p><ul><li><strong>Invalidation on write:</strong> Both record and item caches are invalidated with every write, ensuring consistency across regions. This strategy is ideal for graphs that change infrequently and cannot tolerate data staleness, but comes with the tradeoff of pushing a higher throughput on the cache.</li><li><strong>TTL-driven invalidation:</strong> Cache entries are invalidated only when their TTL expires. This approach works best for frequently modified objects that can tolerate some staleness.</li></ul><h4>Work In Progress: Write-Through Caching</h4><p>We are also developing a write-through caching strategy designed to store most of the data required by the Abstraction during traversals. This caching mechanism can organize indexes by different sort orders (e.g., sorting data by last-write timestamp), at the cost of increased memory consumption. Stay tuned for more details on this approach.</p><p>Next, let’s examine the consistency guarantees in Graph Abstraction and how they are enforced for both reads and writes.</p><h3>Consistency Enforcement</h3><p>Enforcing data consistency in Graph Abstraction poses several challenges. The connected nature of the data, low-latency API requirements, and the need to handle intermittent failures have led to design choices that enforce strict eventual consistency across multiple regions.</p><h4>Entropy Repair</h4><p>Each write in the Abstraction persists data for both inward and outward indices in parallel to support high throughput. Further, each write happens on multiple KV namespaces. To prevent inconsistencies or lasting entropy from failures in any operation, the Abstraction uses a robust retry mechanism using Kafka:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b-QZ0X3ODaHCbUmVGZ1jFw.png" /></figure><h4>Node Deletions</h4><p>Deleting nodes in a highly connected graph is more complex than simply removing a KV record as each node may have thousands of connected edges that must be handled to maintain graph integrity. Further, synchronously deleting all such connections would introduce unacceptable latency for the Abstraction callers.</p><p>The Abstraction employs an asynchronous deletion strategy to manage this issue. The consequence of this approach, however, is that the observed mutated state is only eventually consistent. Further, to ensure correctness of asynchronous deletes during concurrent updates, the Last-Write-Wins (LWW) conflict resolution mechanism is essential.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AUGcrovbyUWfdNnbk8gPdw.png" /></figure><h4>Global Replication</h4><p>The consistency guarantees of Graph Abstraction are shaped by its multi-region availability. As illustrated in the diagram below, both the caching layer and durable storage replicate data asynchronously across regions, resulting in an eventually consistent system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xJq5kKpXQD-CQZxpp58Z-w.png" /></figure><p>Now that we’ve covered storing the real-time graph index, let’s see how it enables graph traversals.</p><h3>Graph Traversals</h3><p>The Abstraction provides a custom gRPC traversal API, inspired by <a href="https://tinkerpop.apache.org/gremlin.html">Gremlin</a>, which enables exploration of the distributed graph by letting users chain traversals, apply filter criteria, sort results, limit results, and more.</p><p>Let’s explore a hypothetical scenario where the Abstraction is used to recommend shows to users on a shared device, by considering the duration of the most recent viewing session for each show across all profiles and accounts associated with that device:</p><pre>TraversalRequest.newBuilder()<br>  .setNamespace(&quot;&lt;graph-namespace&gt;&quot;)<br>  .setTraversalQuery(<br>     TraversalQuery.newBuilder()<br>       // Given id of the &#39;device&#39; node type.<br>       .setStartNode(node(&quot;device&quot;, &quot;my-device-id&quot;))<br>       .setTraversal(<br>          Traversal.newBuilder()<br>            // fetch the first 5 connections<br>            .setEdgeLimit(5)<br>            .setDirectionTraversal(<br>               DirectionTraversal.newBuilder()<br>                  // traverse in the IN direction<br>                  .setDirection(IN)<br>                  // minimize data exchange: only interested in certain properties<br>                  .addNodePropertiesSelections(propSelection(&quot;account&quot;, &quot;created_at&quot;))<br>                  .addNodePropertiesSelections(propSelection(&quot;profile&quot;, &quot;last_active&quot;))<br>                  .setDirectionFilter(<br>                     DirectionFilter.newBuilder()<br>                       // only interested in certain connected types<br>                       .setTypeMatchingStrategy(EXCLUDE_NON_TARGETED)<br>                       .addAllNodeFilters(typeFilters(&quot;account&quot;, &quot;profile&quot;))))<br>            // chain traversals to the intermediate result<br>            .addNextTraversals(<br>               Traversal.newBuilder()<br>                 .setOrder(LATEST)<br>                 // limit to 200 connections for the 2nd hop<br>                 .setEdgeLimit(200)<br>                 .setDirectionTraversal(<br>                    DirectionTraversal.newBuilder()<br>                      // now traverse in the OUT direction<br>                      .setDirection(OUT)<br>                      .addEdgePropertiesSelections(propSelection(&quot;watched&quot;, &quot;view_time&quot;))<br>                      .addEdgePropertiesSelections(propSelection(&quot;has_plan&quot;, &quot;active&quot;))<br>                      .setDirectionFilter(<br>                         DirectionFilter.newBuilder()<br>                           .setTypeMatchingStrategy(EXCLUDE_NON_TARGETED)<br>                           .addAllNodeFilters(typeFilters(&quot;title&quot;, &quot;plan&quot;)))))))<br>  .build();</pre><p>And let’s visualize the intended results set produced by the request above:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_uEbkvl_zlhcJPHTQnubgg.png" /></figure><p>We’ll explore the design and implementation of traversal planning and execution, along with different traversal types, in the <strong>Part II</strong> of this blog series.</p><p>Now let’s look at the performance metrics of Graph Abstraction based on current production use cases.</p><h3>Real World Performance</h3><p>Across all applications at Netflix, Graph Abstraction ensures high availability while processing up to 10 million operations per second across all writes, individual edge / node reads and traversals at peak hours:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*71VBcBOx20n6sEaS6rYRJg.png" /></figure><p>Edge and node persistence achieve single-digit millisecond latencies (p99 shown in red, p90 shown in orange, and p50 shown in green):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SwBXgPnu_bMeR1nJkQpbsw.png" /></figure><p>Traversal performance depends on the number of hops, the edge fanout at each stage, and associated filters and sort orders. We parallelize work as much as possible to reduce latencies. Typically 1-hop traversals are executed with single-digit millisecond latency:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CW1f9ULedUK7u_W7hsz3Qw.png" /><figcaption>1-hop traversal latencies</figcaption></figure><p>We also support a Count API that performs counting traversals at a very high rate with similar latencies, which we will cover in Part II of this series:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wUCzYRbui9BRuL42uCdL8Q.png" /></figure><p>Currently, the RDG is powered by 2-hop traversals with a higher degree of fan-out. While these operations can reach upwards of 100 ms in latency, the 90th percentile (p90) latency remains under 50ms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fzuOdqu0RmEza6cK44v48A.png" /><figcaption>2-hop traversal latencies</figcaption></figure><p>We track the average and max edge fanout at different depths to give us insights into the traversal performance for different graph datasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*96pqab2LqCK3-RSAe3qcEQ.png" /><figcaption>Median edge fan-out</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OHOoHxkkC2EXvTRNgyRM7w.png" /><figcaption>Max edge fan-out</figcaption></figure><p>Asynchronous operations such as node deletions can be slightly latent, but typically perform with sub-second latency:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lWev5g0OStQycd3Ebo5arw.png" /></figure><p>At the moment, we are storing close to 650 TB of data globally across all our graph datasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y7lKTbAqi9Lid7dSAOY_Mw.png" /></figure><h3>Conclusion</h3><p>As Netflix scales further into new verticals such as live content, games, and ads, Graph Abstraction will remain crucial for uncovering and leveraging rich connections — while continuing to support a high throughput and availability at low latencies.</p><p>Stay tuned for <strong>Part II</strong> of this blog series, where we’ll explore the implementation of graph traversals, counting and constraint mechanisms.</p><p>In <strong>Part III</strong>, we’ll take a closer look at the temporal index implementation and its integration with the Time Series Abstraction.</p><h3>Acknowledgments</h3><p>Special thanks to our stunning colleagues who contributed to Graph Abstraction’s success: <a href="https://www.linkedin.com/in/kaidanfullerton/">Kaidan Fullerton</a>, <a href="https://www.linkedin.com/in/joseph-lynch-9976a431/">Joey Lynch</a>, <a href="https://www.linkedin.com/in/sudheshsuresh/">Sudhesh Suresh</a>, <a href="https://www.linkedin.com/in/vinaychella/">Vinay Chella</a>, <a href="https://www.linkedin.com/in/sumanth-pasupuleti/">Sumanth Pasupuleti</a>, <a href="https://www.linkedin.com/in/vidhya-arvind-11908723/">Vidhya Arvind</a>, <a href="https://www.linkedin.com/in/rummadis/">Raj Ummadisetty</a>, <a href="https://www.linkedin.com/in/jordan-west-8aa1731a3/">Jordan West</a>, <a href="https://www.linkedin.com/in/clohfink/">Chris Lohfink</a>, <a href="https://www.linkedin.com/in/joe-lee-a70661a2/">Joe Lee</a>, <a href="https://www.linkedin.com/in/jingxi-huang/">Jingxi Huang</a>, <a href="https://www.linkedin.com/in/jessicaswalton/">Jessica Walton</a>, <a href="https://www.linkedin.com/in/prudhviraj9/">Prudhviraj Karumanchi</a>, <a href="https://www.linkedin.com/in/akashdeepgoel/">Akashdeep Goel</a>, <a href="https://www.linkedin.com/in/sriram-rangarajan-35169715/">Sriram Rangarajan</a>, <a href="https://www.linkedin.com/in/chrisvanvlack/">Chris Van Vlack</a>, <a href="https://www.linkedin.com/in/chrisleegray/">Christopher Gray</a>, <a href="https://www.linkedin.com/in/lu4nm3/">Luis Medina</a>, <a href="https://www.linkedin.com/in/ajitkoti/">Ajit Koti</a>, <a href="https://www.linkedin.com/in/mohidul-abedin">Mohidul Abedin</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e88063e6f6d5" width="1" height="1" alt=""><hr><p><a href="https://netflixtechblog.com/high-throughput-graph-abstraction-at-netflix-part-i-e88063e6f6d5">High-Throughput Graph Abstraction at Netflix: Part I</a> was originally published in <a href="https://netflixtechblog.com">Netflix TechBlog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Silos to Service Topology: Why Netflix Built a Real-Time Service Map]]></title>
            <link>https://netflixtechblog.com/from-silos-to-service-topology-why-netflix-built-a-real-time-service-map-0165ba13a7bc?source=rss----2615bd06b42e---4</link>
            <guid isPermaLink="false">https://medium.com/p/0165ba13a7bc</guid>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[platform-engineering]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[observability]]></category>
            <dc:creator><![CDATA[Netflix Technology Blog]]></dc:creator>
            <pubDate>Fri, 29 May 2026 14:01:02 GMT</pubDate>
            <atom:updated>2026-05-29T18:45:18.988Z</atom:updated>
            <content:encoded><![CDATA[<p><em>By </em><a href="https://www.linkedin.com/in/parth-jain-8a09abb6/"><em>Parth Jain</em></a>, <a href="https://www.linkedin.com/in/raskuma/"><em>Rakesh Sukumar</em></a><em>, </em><a href="https://www.linkedin.com/in/yingwu-zhao-62037418/"><em>Yingwu Zhao</em></a><em>, </em><a href="https://www.linkedin.com/in/renzosanchezsilva/"><em>Renzo Sanchez</em></a><em> &amp; </em><a href="https://www.linkedin.com/in/nathfisher/"><em>Nathan Fisher</em></a><em><br>How we built a living map of our distributed infrastructure to help engineers understand dependencies, troubleshoot faster, and keep Netflix running smoothly for our members around the world.</em></p><h3>The Puzzle with a Thousand Pieces</h3><p>Picture this: It’s 3am, and an engineer gets paged. One of our critical services is showing elevated error rates. Members trying to watch their favorite films and series are seeing degraded experiences. The clock is ticking.</p><figure><img alt="A central service node connected to multiple downstream services and data stores, illustrating the tangled dependency graph engineers must navigate without a service topology map." src="https://cdn-images-1.medium.com/max/799/1*t_oo96UujawlqwGtmBBm7Q.png" /><figcaption>A single service at the center of a web of dependencies — services, data stores, and call chains branching in every direction. Without a unified map, engineers have to reason about this structure from memory and scattered signals.</figcaption></figure><p>In a system with thousands of microservices supporting our entertainment experience for members worldwide, answering these questions quickly can mean the difference between a minor blip and a major incident.</p><p>We kept hearing variations of this story from engineers across Netflix. The tooling gap was clear: we had plenty of signals, but no unified way to understand how everything connected.</p><h3>The Three Questions Every Engineer Asks</h3><p>When troubleshooting distributed systems, engineers fundamentally need to understand relationships:</p><p><strong>Which services depend on each other?</strong> Not just theoretical dependencies from configuration files or architecture diagrams, but actual runtime connections based on real traffic.</p><p><strong>What’s the blast radius?</strong> When something breaks or needs to go down for maintenance, what else will be affected? Which teams need to be notified?</p><p><strong>Where’s the source?</strong> Is my problem caused by an upstream issue, or am I the root cause that’s cascading to others?</p><p>Traditional observability tools show fragments of this picture. Metrics show symptoms and performance characteristics. Logs show individual service behavior. Traces show single request flows through the system. But none of them show the complete map of how everything connects — the steady-state topology of dependencies that forms the backbone of our distributed architecture.</p><p>For an engineer at 3am, having to mentally stitch together information from multiple tools is slow, error-prone, and stressful. We needed something better: a unified view of service dependencies — a map showing how everything connects — with easy navigation to the detailed signals when you need to dig deeper.</p><h3>Why This Matters More Than Ever</h3><p>Netflix runs on thousands of microservices working together to deliver entertainment to our members. When you press play on your favorite series, that single action triggers a cascade of service-to-service calls — authentication, recommendations tailored to your tastes, video encoding selection, playback optimization, and more.</p><p>This architecture gives us tremendous flexibility and allows hundreds of engineering teams to innovate independently. But it also creates fundamental observability challenges.</p><p>And these challenges were growing. New initiatives like our Live programming and Ads-supported plans require even more sophisticated monitoring and faster troubleshooting. Live events can’t wait for lengthy incident investigations. The scale and real-time nature of these systems demanded better tooling.</p><p>We analyzed thousands of support requests from our engineers over a four-year period. The patterns were consistent:</p><ul><li>“What are my upstream and downstream dependencies?”</li><li>“Is this failure in my service, or is something I depend on broken?”</li><li>“Which services will be impacted if I take this down for maintenance?”</li><li>“Why is this service showing as ‘Unknown’ in my metrics?”</li><li>“What changed in my call path recently that could explain this behavior?”</li></ul><p>Engineers were asking dependency questions constantly. We needed to provide answers — quickly, accurately, and in real-time.</p><h3>Building on What We Learned</h3><p>We didn’t start from scratch. Over the years, we explored various approaches to solving this problem — from evaluating external graph databases and vendor platforms to building internal prototypes with different storage technologies and data models.</p><h4>Each iteration taught us something valuable:</h4><p><strong>Real-time matters:</strong> Dependency maps that are hours old are useless in dynamic environments where services deploy multiple times per day. We needed near real-time updates.</p><p><strong>Scale changes everything:</strong> Solutions that work at modest scale hit fundamental walls at Netflix scale. Storage systems that handle thousands of nodes struggle with our service count and traffic volume.</p><p><strong>Integration is key:</strong> Any solution needs seamless integration with our existing observability ecosystem. Engineers shouldn’t have to learn entirely new tools or leave their existing workflows.</p><p><strong>Data quality is critical:</strong> Incomplete or incorrect dependency information is worse than no information — it leads to wrong conclusions during incidents.</p><p><strong>Multiple perspectives needed: </strong>We learned that no single source of dependency information tells the complete story. Network connectivity data lacks application context. Application metrics only cover instrumented services. We needed to combine multiple sources.</p><p>These lessons shaped every decision we made in building Service Topology.</p><h3>What We Needed: A Living Map</h3><p>We set out to build something specific: a living map of our infrastructure — one that updates in real-time as services deploy, as traffic patterns shift, as new dependencies form and old ones disappear.</p><p>The requirements were clear:</p><p><strong>Real-time updates, not stale snapshots:</strong> In an environment where services deploy continuously, yesterday’s topology map is archaeology, not observability.</p><p><strong>Fast queries at scale:</strong> When an engineer is troubleshooting at 3am, they can’t wait minutes for a query to return. We needed sub-second response times for traversing the call graph.</p><p><strong>Multiple layers:</strong> Network-level connectivity doesn’t tell the whole story. We needed to see both the network layer (what’s actually talking to what) and the application layer (which APIs and endpoints are being called).</p><p><strong>Rich context, not just connections:</strong> Knowing Service A talks to Service B isn’t enough. We needed to overlay health status, availability tiers, business domains, ownership information, and other metadata to make the information actionable.</p><p><strong>Visual and programmatic access:</strong> Engineers needed a UI for exploration and troubleshooting. But automated systems — resilience frameworks, blast radius calculators, incident response automation — needed programmatic API access.</p><h3>Our Approach: Three Sources of Truth</h3><figure><img alt="Three topology layers side by side: eBPF flow logs producing a network graph, IPC metrics producing an application graph, and distributed traces producing a request graph, all feeding into a unified view." src="https://cdn-images-1.medium.com/max/996/1*68tW9-7kC3oGL0T5J5di_A.png" /><figcaption>Three data sources produce three independent topology graphs — network, application, and request — each stored separately and queryable on their own or merged into a single unified view.</figcaption></figure><p>Here’s the key insight we arrived at: no single source tells the complete story.</p><p>We built Service Topology by using three complementary sources to build separate dependency graphs — one from each perspective — that can be combined into a unified view or explored independently:</p><p>Each source creates its own graph that is physically separate — the network layer in one graph database partition, the IPC layer in another partition, and the tracing layer using columnar storage optimized for analytical queries. This physical separation allows each layer to evolve independently and be queried in parallel. When users request a unified view, we execute traversal queries across all layers simultaneously and merge results, achieving sub-second response times even when combining all three layers.</p><p>Each source creates its own graph of service relationships:</p><h4>1. eBPF Network Flows (Network Layer)</h4><p>We capture network flow records at the kernel level using eBPF technology — information about which services are connecting to which other services over the network. This gives us ground truth about actual network-level communication.</p><p>The value: Comprehensive coverage. Every service shows up here because we’re capturing actual network traffic, regardless of whether applications are instrumented. This layer provides topology at both cluster-level (which deployment clusters are communicating) and app-level (which applications are communicating).</p><p>The limitation: Network-level information lacks application context. We know Service A connected to Service B’s IP address using a specific protocol, but not which specific API endpoint or path was called (e.g., /api/v1/users vs /api/v1/orders).</p><h4>2. IPC Metrics (Application Layer)</h4><p>We collect Inter-Process Communication metrics from our instrumented services. These are the metrics applications emit when they make calls to other services via gRPC, GraphQL, REST, or other protocols.</p><p>The value: Rich application context. We can see which specific endpoints were called, error rates, latency distributions, protocol details, and request/response characteristics. This layer provides app-level topology — since IPC metrics are emitted by applications, the natural granularity is application-to-application connections with endpoint details.</p><p>The limitation: Only works for instrumented services. If a service doesn’t emit IPC metrics, we won’t see its application-level calls this way.</p><h4>3. End-to-End Tracing (Request Layer)</h4><p>We integrate distributed tracing information that follows individual requests as they flow through our system. We aggregate traces to build a unified topology graph, but also allow engineers to overlay individual traces on the topology to see specific request flows.</p><p>The value: Shows actual request paths. Not just “Service A <em>can</em> call Service B,” but “Service A <em>did</em> call Service B as part of serving this specific member request.” This captures runtime behavior, including conditional logic and feature flags. Engineers can both see the aggregated pattern and drill into individual traces. We aggregate traces to build topology at both cluster-level and app-level, allowing engineers to view request patterns at the granularity most useful for their investigation.</p><p>The limitation: Sampling. We can’t trace every request without impacting performance, so we sample. This is excellent for understanding common flows, but may miss rarely-used code paths in the aggregated view.</p><h4>Bringing It Together: Multi-Layer Architecture</h4><p>Here’s what makes this powerful: we build three separate graphs — one from each source — that create different perspectives on service relationships:</p><ul><li><strong>Network graph from eBPF flows:</strong> Every connection, regardless of instrumentation</li><li><strong>Application graph from IPC metrics:</strong> Rich endpoint and protocol details</li><li><strong>Request graph from tracing:</strong> Actual runtime behavior and call paths</li></ul><p>Engineers can:</p><ul><li>View each graph independently to focus on a specific perspective (pure network connectivity, application-level calls, or traced request flows)</li><li>Combine them into a unified graph by querying multiple partitions in parallel and merging results — our system returns the union of nodes and edges from all requested layers while preserving each layer’s distinct properties</li></ul><p>The unified view is especially powerful because:</p><ul><li>Network flows ensure completeness — we don’t miss anything</li><li>IPC metrics provide application details — we understand the “how” and “what”</li><li>Tracing shows actual behavior — we see real request patterns</li></ul><p>Each source compensates for the limitations of the others. The result is a comprehensive, accurate, and contextualized view of service dependencies that can be explored from multiple angles.</p><h3>From Flows to Graph: How We Built It</h3><p>Here’s the high-level architecture (we’ll dive deeper into engineering challenges in our next post):</p><figure><img alt="Pipeline diagram showing data flowing from a message stream through Stage 1 initial aggregation, Stage 2 intermediary resolution, and Stage 3 persistence and enrichment into a graph database, then exposed via an API." src="https://cdn-images-1.medium.com/max/1024/1*bvSG8r3B-fffrr-2ZKCtpA.png" /><figcaption>Flow logs travel from multi-region Kafka through three aggregation stages — initial batching, intermediary resolution, and final enrichment — before being persisted to the graph database and served via API.</figcaption></figure><p><strong>Multi-Region Ingestion:</strong> We consume flow logs from Kafka across multiple AWS regions where Netflix operates. This runs continuously, processing millions of flow records as they arrive.</p><p><strong>Distributed Processing:</strong> We use Apache Pekko Streams (a fork of Akka) to process these flows in a distributed, fault-tolerant pipeline. The system automatically partitions work across our Auto Scaling Groups to handle the volume and provides natural backpressure handling.</p><p><strong>Three-Stage Distributed Aggregation</strong>: We aggregate network flows through a three-stage pipeline that solves a fundamental challenge: network flow logs only show individual network hops through intermediaries (App A → Load Balancer → App B, or App A → NAT Gateway → App B), not the true application-level connections we need (App A → App B).</p><figure><img alt="Before and after diagram showing intermediary resolution: raw flow logs recording two hops from App A through a load balancer to App B are collapsed into a single direct edge from App A to App B." src="https://cdn-images-1.medium.com/max/292/1*UcZvGrHzMq6geyat9MZv7g.png" /><figcaption>Stage 2 resolves network intermediaries: raw flow logs show two separate hops (App A → Load Balancer → App B), but the resolved graph stores the direct application-to-application relationship (App A → App B).</figcaption></figure><p>Stage 1 performs initial aggregation from Kafka. Stage 2 applies resolution logic — identifying network intermediaries (load balancers, NAT gateways, API gateways, proxies) and combining their incoming and outgoing flows to reconstruct direct application-to-application paths. Stage 3 performs final aggregation with health status integration before graph persistence. This graduated approach also prevents hot spots by distributing load across multiple points even when specific applications or network intermediaries see 100x more traffic than others.</p><p>Graph Storage: We persist the topology in <a href="https://netflixtechblog.medium.com/high-throughput-graph-abstraction-at-netflix-part-i-e88063e6f6d5">Netflix’s graph database</a>, an abstraction layer built on top of our distributed key-value storage infrastructure. This graph database is specifically designed for high-throughput graph operations at our scale, with fast multi-hop traversal capabilities. Each of our three data sources (network flows, IPC metrics, tracing) creates a separate graph that can be queried independently or merged.</p><p>gRPC API: We expose the topology through a gRPC service that supports multi-hop traversal, filtering by availability tier and business domain, pagination for large result sets, and sub-second query response times.</p><p>The technical details of building this at Netflix scale — handling Kafka lag, managing memory and garbage collection, optimizing distributed processing, debugging reactive streams — deserve their own discussion. We learned a lot, and we’ll share those lessons in our next post.</p><h3>What Engineers Can Do Now</h3><p>Today, the service topology map is helping engineers across Netflix:</p><p><strong>Visualize Dependencies:</strong> See upstream and downstream dependencies for any service, with the ability to filter by availability tier (Tier 0, Tier 1, etc.) and business domain. Choose between the unified view (combining all sources) or individual graph views (network-only, IPC-only, or trace-only) depending on what you’re investigating.</p><p><strong>Jump to Detailed Signals: </strong>From any service in the topology, quickly navigate to logs, traces, and detailed metrics in their respective tools. No more hunting for the right service name or time window — the topology provides the context and the starting point.</p><p><strong>Understand Blast Radius:</strong> Before taking a service down for maintenance or making significant changes, see exactly what will be impacted. Identify which teams to notify and what to monitor.</p><p><strong>Overlay Health Status:</strong> See not just the topology, but which services in the call path are experiencing issues. This is integrated with health status tracking, so you can quickly identify if a problem you’re seeing is actually originating somewhere else.</p><p><strong>Query Programmatically:</strong> Use our gRPC API to integrate topology information into automated systems. For example, our Platform Modernization Engineering team uses this to verify that critical Live services have proper availability tier classifications throughout their dependency chains.</p><p><strong>Investigate Faster:</strong> During incidents, quickly identify if a failure is local or if it’s propagating from somewhere else in the call graph. Follow the failure pattern to find the root cause.</p><p><strong>Plan Changes Confidently:</strong> Understand the impact of proposed architectural changes or service migrations before implementing them.</p><p><strong>Time Travel Through Topology:</strong> Query what the topology looked like at specific points in the past. Understand what changed in dependencies around the time an issue started, or see how your service’s dependency footprint has evolved over time. This time-travel capability is powered by time-window aggregation — instead of storing every time slice separately, we use layer-specific aggregators that accumulate topology data across windows, allowing us to reconstruct historical views efficiently without exploding storage costs.</p><h3>The Living Map: Always Current</h3><p>What makes this truly useful is that it’s a living map. It’s not a static diagram drawn in a design document that goes out of date the moment it’s published. It’s continuously updated based on actual traffic:</p><ul><li>When a new service starts calling an API, it appears in the topology with near real-time freshness</li><li>When a service stops making calls to a dependency, that edge fades from the graph</li><li>When services deploy and their behavior changes, the topology reflects it</li><li>When incidents impact service health, the status overlay updates in real-time</li></ul><p>This means engineers can trust what they see. The map reflects reality, not someone’s idea of what the architecture should be.</p><h3>The Journey Continues</h3><p>We’re not done. We continue to evolve the system with new capabilities:</p><p>Change Event Overlay: We’re working to surface deployment events, configuration changes, and other mutations alongside the topology graph. Correlation becomes easier when you can see both the dependencies and what changed when.</p><p>Richer Context: As we expand coverage and integrate more signals, we continue to enrich the topology with additional endpoint-level details, protocol information, and network path context.</p><p>And looking further ahead, we’re excited about something bigger: Automated root cause analysis. Imagine an intelligent agent that continuously crawls the topology graph, correlates failures across dependencies, understands historical patterns, and surfaces likely root causes automatically. Service topology provides the knowledge graph foundation that makes this kind of intelligent automation possible.</p><h3>Why This Matters for Our Members</h3><p>This might seem like infrastructure — plumbing that our members never see directly. But it matters immensely to their experience.</p><p>When engineers can quickly understand dependencies and identify issues, incidents get resolved faster. When we can model blast radius before making changes, we avoid disruptions. When automated systems can query dependency information programmatically, we can build smarter, more resilient systems.</p><p>All of this translates to what matters most: our members getting to watch their favorite films and series, seamlessly, whenever they want. Whether it’s a weekend binge of a beloved show, a live sports event, or discovering something new through our recommendations tailored to their tastes — we want it to just work.</p><h3>What’s Next in This Series</h3><p>This is the first in a series of posts about building Service Topology at Netflix.</p><p>In our next post, we’ll pull back the curtain on the engineering challenges we faced at scale: How do you handle Kafka consumer lag when ingesting millions of flow logs per second? What happens when distributed processing meets garbage collection pauses? How do you debug reactive streams that stall under load? How do you manage hot nodes in a distributed system? We’ll share the real problems we hit in production and the solutions we developed.</p><p>In future posts, we’ll explore the lessons we learned that apply to any distributed system at scale, and where we’re heading next with time travel capabilities and Automated root cause analysis.</p><h3>Acknowledgements</h3><p><em>This post was written by </em><a href="https://www.linkedin.com/in/parth-jain-8a09abb6/"><em>Parth Jain</em></a><em>.</em></p><p><em>Service Topology was built by </em><a href="https://www.linkedin.com/in/parth-jain-8a09abb6/"><em>Parth Jain</em></a><em>, </em><a href="https://www.linkedin.com/in/raskuma/"><em>Rakesh Sukumar</em></a><em>, </em><a href="https://www.linkedin.com/in/yingwu-zhao-62037418/"><em>Yingwu Zhao</em></a><em>, </em><a href="https://www.linkedin.com/in/renzosanchezsilva/"><em>Renzo Sanchez-Silva</em></a><em>, and </em><a href="https://www.linkedin.com/in/nathfisher/"><em>Nathan Fisher</em></a><em>.</em></p><p><em>Special thanks to the many engineers across Netflix who made this possible — the Observability team who built the broader system, the graph database platform team who provided the storage foundation, and the Platform Modernization Engineering, Live, and Ads teams who provided invaluable feedback and use cases throughout development.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0165ba13a7bc" width="1" height="1" alt=""><hr><p><a href="https://netflixtechblog.com/from-silos-to-service-topology-why-netflix-built-a-real-time-service-map-0165ba13a7bc">From Silos to Service Topology: Why Netflix Built a Real-Time Service Map</a> was originally published in <a href="https://netflixtechblog.com">Netflix TechBlog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scaling ArchUnit with Nebula ArchRules]]></title>
            <link>https://netflixtechblog.com/scaling-archunit-with-nebula-archrules-b4642c464c5a?source=rss----2615bd06b42e---4</link>
            <guid isPermaLink="false">https://medium.com/p/b4642c464c5a</guid>
            <category><![CDATA[gradle]]></category>
            <category><![CDATA[nebula]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[archunit]]></category>
            <dc:creator><![CDATA[Netflix Technology Blog]]></dc:creator>
            <pubDate>Fri, 08 May 2026 15:55:59 GMT</pubDate>
            <atom:updated>2026-05-08T15:56:00.919Z</atom:updated>
            <content:encoded><![CDATA[<p>By <a href="https://github.com/wakingrufus">John Burns</a> and <a href="https://www.linkedin.com/in/emilyyuan03/">Emily Yuan</a></p><h3>Introduction</h3><p>At Netflix, we operate using a <a href="https://netflixtechblog.com/towards-true-continuous-integration-distributed-repositories-and-dependencies-2a2e3108c051">polyrepo</a> strategy with tens of thousands of Java repositories. This means that we need to have ways of sharing common build logic across these repositories. On the <a href="https://sites.google.com/netflix.com/javaplatformnetflix/jvm">JVM Ecosystem team</a> within Java Platform, we build tooling such as the <a href="https://github.com/nebula-plugins">Nebula suite of Gradle plugins</a> to provide standard ways to build projects, keep dependencies up-to-date, and publish artifacts reliably across the Java ecosystem. Our mission also entails providing build-time feedback to the developer when they deviate from the <a href="https://netflixtechblog.com/how-we-build-code-at-netflix-c5d9bd727f15">paved road</a>, or when their code base contains technical debt.</p><h3>Case Study</h3><p>After a Netflix incident relating to a library releasing a backwards-incompatible change, our team was asked to provide some tooling and practices to improve the Java library lifecycle management. This was not a simple case of a library making a reckless breaking change. The code removed had been deprecated for years. Library authors often struggle to know when it is safe to remove deprecated code, or refactor code that is not meant to be used by downstream applications. Fleet-wide migrations, such as upgrading major Spring Boot versions, also involve deprecated code removal. To help with this, we established a suite of API lifecycle annotations:</p><ul><li>@Deprecated from the Java standard library</li><li>@Public A custom annotation to use on APIs meant to be used downstream</li><li>@Experimental A custom annotation for new APIs which may not yet be stable</li><li>All other APIs are assumed to be “internal”</li></ul><p>Library authors can annotate their APIs with these annotations. However, how will they know which downstream projects are using their API incorrectly, based on these?</p><p>As we sought to improve the paved road for JVM-based libraries at Netflix, we needed a good way of identifying this kind of technical debt, not only for the benefit of the Java Platform-provided libraries, but any team delivering shared libraries to the organization. For this, we looked at ArchUnit.</p><p><a href="https://www.archunit.org/">ArchUnit</a> is a popular OSS library (3.5k stars, 84 contributors) used to enforce “architectural” code rules as part of a JUnit suite. It is used internally by Gradle, Spring, and is provided as part of the <a href="https://spring.io/projects/spring-modulith">Spring Modulith</a> platform. The rules engine, which is built directly on top of <a href="https://asm.ow2.io/">ASM</a>, can be used for a wide variety of use cases. It is powerful enough to be a general purpose static analysis tool with the following distinctive features:</p><p>1. Works cross-language (JVM), because it uses ASM/bytecode, not AST parsing.</p><p>2. Exposes a builder API pattern that makes it easy to write rules</p><p>3. Also has a lower level API ideal for writing more complex custom rules.</p><p>The limitation of ArchUnit is that it is designed to be used as part of a JUnit suite in a single repository. The Nebula ArchRules plugins give organizations the ability to share and apply rules across any number of repositories. Rules can be sourced from OSS libraries or private internal libraries. This makes the plugin generally useful for any JVM+Gradle engineering organization.</p><h3>Why ArchUnit?</h3><p>Before we go into how ArchRules works, it is good to understand why we would want to use ArchUnit in this way instead of other static analysis tools.</p><h4>AST vs Bytecode</h4><p>Some tools, such as PMD, process rules against an AST (abstract syntax tree). An AST is a structured representation of source code. This kind of tool will have rules that are syntax dependent. Rules that need to support multiple JVM languages, such as Kotlin or Scala, often need to be rewritten for each language. It also allows code which should be found to be hidden under syntactic sugar not anticipated by the rule author. ArchUnit uses <a href="https://asm.ow2.io/">ASM</a> to analyze actual compiled bytecode, which means it doesn’t matter how that code was produced. What is analyzed is the actual code that will be run.</p><h4>Rule Authorship</h4><p>Tools like PMD and Spotbugs are not optimized for custom rule authorships. Most usage of these tools run built-in provided rules, or add in pre-made third party plugins. Take a look at what a custom rule for PMD might look like:</p><pre>&lt;![CDATA[<br> //AllocationExpression/ClassOrInterfaceType[<br>   @Image=&#39;DateTime&#39; and (<br>       (count(..//Name[@Image=&#39;DateTimeZone.UTC&#39;])&lt;=0)<br>       and<br>       (count(..//Name[@Image=&#39;DateTimeZone.forID&#39;])&lt;=0)<br>    ) or (<br>       (<br>           (count(..//Name[@Image=&#39;DateTimeZone.UTC&#39;])&gt;0)<br>             or<br>           (count(..//Name[@Image=&#39;DateTimeZone.forID&#39;])&gt;0)<br>       ) and (../Arguments/ArgumentList and count(../Arguments/ArgumentList/Expression) = 1)<br>   )<br> ]<br>]]&gt;</pre><p>This rule ensures that DateTimes are not instantiated without an explicit zone. This is a raw string meant to be used within PMD’s xpath parser. There is no IDE guidance on crafting it. To test it, a whole separate PMD process needs to be wired up to interpret the rule and evaluate it against a source file. Let’s see how a similar rule would look with ArchUnit:</p><pre>ArchRuleDefinition.priority(Priority.MEDIUM)<br>.noClasses()<br>.should()<br>.callConstructorWhere(<br>    // constructor does not have a zone arguement<br>    target(doesNot(have(rawParameterTypes(DateTimeZone.class))))<br>   // constructor is for DateTime<br>        .and(targetOwner(assignableTo(DateTime.class)))<br>)</pre><p>This is type-safe Java code with a fluent API. It is also simple to unit test, as ArchUnit has a method to pass a rule object and class references to evaluate the rule against those classes.</p><h4>Class Relations</h4><p>Because ArchUnit processes the entire classpath with ASM, it retains a graph of the class data, allowing rules to easily traverse class relationships and call sites. This allows rules to have much more context about the code it is evaluating.</p><h3>Rules Libraries</h3><p>The first step was to build the ability to write ArchUnit rules which can be shared and published. In order to do this, we have the <a href="https://github.com/nebula-plugins/nebula-archrules-plugin?tab=readme-ov-file#authoring-rules">ArchRules Library Plugin</a>. This plugin adds an additional source set to your Gradle project called archRules. In this source set, you can create a class which implements the ArchRulesService interface. This interface has a single abstract method which returns a Map&lt;String, ArchRule&gt;. The keys of this map are the names of your rules, and the ArchRule is the rule you would like to define using the standard ArchUnit API. Here is an example:</p><pre>public class GuavaRules implements ArchRulesService {<br>  static final ArchRule OPTIONAL = ArchRuleDefinition.priority(Priority.MEDIUM)<br>        .noClasses()<br>        .should()<br>        .dependOnClassesThat()<br>        .haveFullyQualifiedName(&quot;com.google.common.base.Optional&quot;)<br>        .because(&quot;Java Optional is preferred over Guava Optional&quot;);<br><br>    @Override<br>    public Map&lt;String, ArchRule&gt; getRules() {<br>        Map&lt;String, ArchRule&gt; rules = new HashMap&lt;&gt;();<br>        rules.put(&quot;guava optional&quot;, OPTIONAL);<br>        return rules;<br>    }<br>}</pre><p>This code and its dependencies will not be bundled with your main code. It is bundled into a separate Jar with the arch-rules classifier. When publishing, your library will publish this jar as a separate variant with the usage attribute set to arch-rules. This means that in order for downstream projects to use these rules, they must use <a href="https://docs.gradle.org/current/userguide/publishing_gradle_module_metadata.html">Gradle Module Metadata</a> for dependency resolution. There are 2 flavors of rules Libraries: Standalone rules libraries, bundled rule libraries.</p><h4>Standalone Rule Libraries</h4><p>A Standalone Rule library contains no main code: only archRules. These are useful for defining rules for code you don’t own, such as Core Java APIs or OSS libraries. They are also useful for generic rules that can apply to any code, such as “don’t use code marked as @Deprecated”. We maintain a <a href="https://github.com/nebula-plugins/nebula-archrules">collection</a> of OSS Standalone rule libraries which anyone is free to use, and serve as examples of the types of rules you may want to write yourself. However, the real power of ArchRules is in “bundled rule libraries”.</p><h4>Bundled Rule Libraries</h4><p>A bundled rule library is a library with both main and archRules sources. The main source set will contain useful library code, whatever it may be. The archRules will contain rules specific to the usage of that library. For example, rules scoped to that library’s package, or referencing that library’s specific API. Whenever possible, we recommend writing rules in this bundled way. That is because the <a href="https://github.com/nebula-plugins/nebula-archrules-plugin?tab=readme-ov-file#running-rules">ArchRules Runner Plugin</a> will be able to automatically detect these rules and run them in only the source sets that use this library as a dependency. An example of this can be seen in our <a href="https://github.com/nebula-plugins/nebula-test/blob/main/src/archRules/java/com/netflix/nebula/test/archrules/NebulaTestArchRules.java">Nebula Test</a> library.</p><p>In any case, the library plugin will automatically generate a service loader registration entry for your ArchRulesService so that the runner can discover your rules.</p><h3>Running Rules</h3><p>The <a href="https://github.com/nebula-plugins/nebula-archrules-plugin?tab=readme-ov-file#running-rules">ArchRules Runner Plugin</a> allows rules to be evaluated against your code. Standalone rule libraries can be evaluated against all source sets by adding them to the archRules configuration in your build. For example:</p><pre>dependencies {<br>    archRules(&quot;your:rules:1.0.0&quot;)<br>}</pre><p>As mentioned before, bundled rules will be evaluated automatically. To do this, the runner plugin creates a separate configuration for each of your source sets. In each of these configurations, the archRules classpath is combined with the runtimeClasspath with the arch-rules variant selected. This configuration is the classpath used when the ServiceLoader discovers implementations of ArchRulesService. In the following example, we have a Project which uses a test helper library as a testImplementation dependency, and also adds a standalone rules library to the archRules configuration. The test runtime classpath will only contain the implementation jar for the helper library, but the arch rules runtime will contain the archrules jar for the bundled rules and standalone rules. This all happens automatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pWrmMaPCSm3XRIsTyMEpgQ.png" /><figcaption>Gradle configurations used by ArchRules</figcaption></figure><p>Once the rules classpath is determined, the runner plugin will create a Gradle work action to evaluate rules against that specific source set. This action runs with classpath isolation using the *archRuleRuntime configuration. Within this action, a ServiceLoader is used to discover rule definitions. The action ends by writing a binary serialization of rule violations to a file for reporting.</p><p>In a project running rules, you also have the ability to customize rule configurations using the archRules extension. For example, you can override a rule’s priority level:</p><pre>archRules {<br>    ruleClass(&quot;com.netflix.nebula.archrules.deprecation&quot;) {<br>        priority(&quot;HIGH&quot;)<br>    }<br>}</pre><p>Other <a href="https://github.com/nebula-plugins/nebula-archrules-plugin?tab=readme-ov-file#running-rules">customizations</a> include disabling running rules on certain source sets and configuring the failure threshold (i.e., high priority failures will cause the build to fail).</p><h3>Reporting</h3><p>The ArchRules runner plugin has two built-in reports: JSON and console. The json report will collect the output from all source sets within a project and create a single json file with all of the data. The console report also collects the output from all source sets within a project, but it prints to the console an easy to read report, for example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BJ2ONrMNHEFsBEks3WMPaQ.png" /><figcaption>Console Report output</figcaption></figure><p>Note that failure details feature a detailed plain English description, along with a pointer to the exact line of code in violation.</p><p>For custom reporting, you can either use the JSON file, or create your own task that reads the binary files. Take a look at the source code for the ArchRules runner plugin’s report tasks for an example of how to do this.</p><h3>Case Study Solution</h3><p>Going back to our original problem, using ArchRules, we were able to deliver a platform for library authors to track the usage of their APIs. They write ArchRules to detect usage of the annotations, scoped to their library’s package, such as:</p><pre>ArchRuleDefinition.priority(Priority.MEDIUM)<br>    .noClasses().that(resideOutsideOfPackage(packageName + &quot;..&quot;))<br>    .should()<br>    .dependOnClassesThat(resideInAPackage(packageName + &quot;..&quot;).and(are(deprecated())))<br>    .orShould().accessTargetWhere(targetOwner(resideInAPackage(packageName + &quot;..&quot;))<br>        .and(target(is(deprecated())).or(targetOwner(is(deprecated())))))<br>    .allowEmptyShould(true)<br>    .because(&quot;Deprecated APIs are subject to removal&quot;);</pre><p>NB: the deprecated() predicate comes from <a href="https://github.com/nebula-plugins/nebula-archrules/blob/main/archrules-common/src/main/java/com/netflix/nebula/archrules/common/CanBeAnnotated.java">nebula-archrules</a>.</p><p>Our internal Nebula standard Gradle wrapper and plugin suite automatically enable the ArchRules runner on every project, and provides a custom reporter which sends the report data to our Internal Developer Portal on every main-branch CI build. This way, library authors can easily see a report of all downstream consumers using their experimental, deprecated, or non-public APIs, giving them confidence to make “breaking” changes, knowing that it will not actually break downstream consumers. If their changes are currently blocked by downstream usage, they can easily see exactly which projects are reporting those usages.</p><h3>OSS Rule Libraries</h3><p>While the most powerful way to use ArchRules is for you to write your own rules, we have built some <a href="https://github.com/nebula-plugins/nebula-archrules">OSS rule libraries</a> that anyone is free to use, or reference as examples.</p><h4>Nullability</h4><p>These rules enforce proper nullability annotation in Java, for example, that every public class is marked with <a href="https://jspecify.dev/">JSpecify</a>’s @NullMarked. It is smart enough to exclude Kotlin code, as Kotlin has built-in nullability.</p><h4>Gradle Plugin Best Practices</h4><p><a href="https://docs.gradle.org/current/userguide/writing_plugins.html">Writing Gradle plugins</a> can be hard, especially since there are many APIs and patterns that should not be used anymore. These rules help enforce current best practices when writing Gradle plugins.</p><h4>Joda / Guava Rules</h4><p>These rule libraries discourage the use of Joda Time and Guava classes (respectively) as these have been superseded by java.time and standard library enhancements.</p><h4>Security Rules</h4><p>These rules help mitigate CVEs by detecting usage of known vulnerable APIs. Ideally, we keep dependencies up to date to mitigate CVEs. But sometimes that is not immediately feasible, and in those cases, a compile time check to ensure the specific vulnerable API is not used is often good enough.</p><h3>Conclusion</h3><p>We are now running 358 (and counting) rules across over 5,000 repositories detecting over nearly 1 million issues. About 1,000 of these issues are for “High” priority rules. Being able to run these rules on this scale allows us to quickly gain insight into our large fleet of microservices, and identify the areas carrying the most critical technical debt. This makes it easier to focus and prioritize our efforts.</p><p>Going forward, we will be exploring how to tie auto-remediation solutions into the ArchRules findings. ArchUnit currently provides very specific and detailed information about failures in reports, which makes a very strong input signal to an auto remediation tool. We will explore deterministic solutions such as <a href="https://docs.openrewrite.org/">OpenRewrite</a> and non-deterministic solutions such as LLMs. Pairing the easy rule authorship and deterministic results of ArchUnit with an auto-remediation tool that can correctly interpret the results to solve the issue at hand will be a very powerful combination.</p><p>We also will investigate how to get ArchRule failure information surfaced in the IDE as inspections.</p><p>If you have questions or feedback about Nebula ArchRules, reach out to us by posting in the #nebula channel on the <a href="http://gradle-community.slack.com">Gradle Community</a> Slack.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4642c464c5a" width="1" height="1" alt=""><hr><p><a href="https://netflixtechblog.com/scaling-archunit-with-nebula-archrules-b4642c464c5a">Scaling ArchUnit with Nebula ArchRules</a> was originally published in <a href="https://netflixtechblog.com">Netflix TechBlog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Democratizing Machine Learning at Netflix: Building the Model Lifecycle Graph]]></title>
            <link>https://netflixtechblog.com/democratizing-machine-learning-at-netflix-building-the-model-lifecycle-graph-5cc6d5828bb1?source=rss----2615bd06b42e---4</link>
            <guid isPermaLink="false">https://medium.com/p/5cc6d5828bb1</guid>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[event-driven-architecture]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[knowledge-graph]]></category>
            <dc:creator><![CDATA[Netflix Technology Blog]]></dc:creator>
            <pubDate>Mon, 04 May 2026 16:01:02 GMT</pubDate>
            <atom:updated>2026-05-15T18:44:41.436Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://www.linkedin.com/in/saishsali/">Saish Sali</a>, <a href="https://www.linkedin.com/in/nipunk/">Nipun Kumar</a>, <a href="https://www.linkedin.com/in/suraelamurugu/">Sura Elamurugu</a></p><h3>Introduction</h3><p>As Netflix has grown, machine learning continues to support our ability to deliver value to members and drive excellence across multiple areas of our business. When Netflix began investing in machine learning over a decade ago, it was primarily focused on a single domain: personalization. Scala was the industry standard, our ML teams were relatively small, and optimizing member engagement was our primary use case. Fast forward to today, and machine learning has become the backbone of Netflix’s business transformation. We now apply ML across various business domains, including:</p><ul><li><strong>Personalization</strong>: Optimizing engagement and helping members discover content they’ll love</li><li><strong>Studio</strong>: Pre and post-production workflows</li><li><strong>Payments</strong><em>: </em>Fraud detection, payment routing, and recurring billing optimization</li><li><strong>Ads</strong>: Our newest domain, requiring real-time decisioning and targeting</li></ul><p>… and a growing number of additional use cases across the company</p><p>Each domain operates with a different tech stack, different business metrics, and a distinct organizational structure. While this diversity is a testament to how machine learning has evolved to drive value across many verticals at Netflix, this growth introduces a new challenge: <strong>enabling cross-pollination of models and data across domains.</strong></p><h3>The Challenge: A Fragmented ML Landscape</h3><p>As our ML investments scaled across these domains, a critical problem emerged: the models produced largely became black boxes. Without any discovery infrastructure, ML practitioners couldn’t easily collaborate or share work across business verticals.</p><p>Consider a concrete example: <a href="https://netflixtechblog.com/mediafm-the-multimodal-ai-foundation-for-media-understanding-at-netflix-e8c28df82e2d">content embeddings</a>. Our Studio teams create sophisticated embeddings that identify scene boundaries, detect visual transitions, and understand content structure. These embeddings were originally built for production workflows.</p><p>But those same embeddings could be incredibly valuable elsewhere. Ads could hypothetically use content embeddings for context matching (ensuring advertisements align with the tone and content of what’s currently playing). Personalization could leverage them for episodic merchandising and recommendations (matching the topic or mood of an episode with a user’s preferred viewing preferences). Yet making this cross-pollination happen is extraordinarily difficult.</p><p>Why? Our ML tools exist in silos, each with its own backend services and user interface. The model registry is unaware of which A/B tests were using its models, and the pipeline orchestrator is unaware of downstream model dependencies. ML practitioners have to traverse multiple systems to answer basic questions about their work. Finding a model requires opening the model registry, understanding its lineage means switching to the pipeline orchestrator, and tracking which A/B tests use that model requires navigating to the experimentation platform. This fragmentation prevents practitioners from answering critical questions:</p><ul><li><strong>Discovery: </strong>What features exist? What data sources are available for generating features for a model?</li><li><strong>Lineage:</strong> Which pipeline is generating data for a specific model? What data sources feed those features?</li><li><strong>Impact:</strong> Which A/B tests are running this model? Which models will break if I change this feature? Who owns each piece of this chain?</li></ul><h3>The Hard Problem: Connecting everything</h3><p>The real challenge wasn’t just building a consolidated UI. We needed to connect the different pieces of infrastructure our ML practitioners were using to perform different parts of the ML lifecycle.</p><p>Our ML ecosystem generates metadata from dozens of sources:</p><ul><li>Pipeline orchestration systems emit execution details, stage dependencies, and data transformations</li><li>Deployed model registry tracks model versions, artifacts, staleness, and deployment history</li><li>Experimentation platform manages A/B tests and their configurations</li><li>Feature store catalog feature definitions and usage</li><li>AI Dataset platform tracks the creation, management, discovery, and loading of datasets.</li><li>Identity platform maintains user, team, and organization metadata</li></ul><p>Each system employs different formats, identifiers, and mental models. The hard technical problem we had to solve was: <strong>How do we collect this heterogeneous metadata, transform it into a unified entity model, and build a connected graph that enables true exploration and collaboration across business domains?</strong></p><h4>The Solution: Metadata Service and the Model Lifecycle Graph</h4><p>Our answer was the Metadata Service (MDS), which builds a Model Lifecycle Graph that indexes and connects ML-related entities across Netflix. MDS is optimized for real-time ingestion of ML metadata (e.g., models, features, pipelines, experiments, datasets) and to answer cross-domain questions such as “Which experiments are running this model?” or “Which models share these features?” It is the foundation that enables discovery, ingesting events from diverse sources, enriching them with context, and materializing relationships across entities.</p><p>Our vision: to make every ML asset at Netflix discoverable, understandable, and reusable by every ML practitioner, regardless of their team or domain.</p><h3>Core Abstractions: The Vocabulary of the System</h3><p>Before diving into the technical implementation, it’s helpful to understand the conceptual model that underpins MDS. This vocabulary enables consistent communication across teams and systems:</p><p><strong>Component:</strong> Any object that is uniquely addressable using an AI Platform’s (AIP) Uniform Resource Identifier (URI). An AIP URI follows the formataip://&lt;componentType&gt;/&lt;platformId&gt;/&lt;resourceId&gt;, ensuring global uniqueness. For example:</p><ul><li>Models: aip://model/registry/ranking-v5</li><li>Users: aip://user/identity/alice</li><li>Pipelines: aip://pipeline/orchestrator/weekly-training</li></ul><p><strong>Entity:</strong> A component within the ML ecosystem, characterized by additional properties such as name, description, creation date, and owners. Entities represent ML-specific assets, such as models, features, and pipelines.</p><p><strong>Entity Type:</strong> A group of entities that share the same data shape. A data shape is a set of property constraints that specify the attributes and relationships an entity must have.</p><p><strong>Domain:</strong> A functional grouping of related entity types that defines the abstract interface for a category of ML assets. For example, the Models domain defines what a Model and Model Instance look like, while the Pipelines domain defines Schedules, Requests, and Executions.</p><p><strong>Provider:</strong> A concrete implementation of a domain, backed by a specific source system. For example, the Models domain is currently backed by our internal model registry. This separation allows MDS to support multiple providers for the same domain. If a new model registry were introduced, it could be added as an additional provider without changing the domain interface.</p><p>We can summarize these concepts with a concrete example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RQuXyzwooTZcUZ5rCejOug.png" /></figure><p>This URI-based addressing scheme is crucial as it allows any service to reference any ML asset with a single string, and MDS can resolve that reference back to rich, connected metadata.</p><h3><strong>From Events to Entities to Graph</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dXe2XJMjTpZ6o5wwvVxGUA.png" /></figure><p>The journey from raw system events to a queryable graph happens in stages. Let’s walk through each with a concrete example: connecting a model to its A/B tests through relationship inference.</p><h4>1 Event Ingestion</h4><p>MDS integrates with various source systems via Kafka and AWS SNS/SQS, consuming events in real-time. Source systems emit thin events that include an identifier and an event type.</p><p>Example event:</p><pre>{<br>  &quot;event_type&quot;: &quot;model_instance_created&quot;,<br>  &quot;instance_id&quot;: &quot;ranking-model-v5-20XX0101&quot;,<br>  ...<br>}</pre><p>This design keeps producers simple. Source systems only need to announce that a change occurred, without building complete payloads or understanding downstream requirements.</p><p>Each source system has dedicated event handlers in MDS:</p><ul><li><strong>Pipeline Orchestration</strong>: Ingests pipeline execution events, including node definitions, schedules, requests, and job attempts</li><li><strong>Model Registry</strong>: Captures model deployments, configurations, and version updates</li><li><strong>Feature Store</strong>: Tracks feature definitions and their versions</li><li><strong>Experimentation Platform</strong>: Monitors A/B test configurations and allocations</li><li><strong>Datasets:</strong> Tracks ML datasets and their versions</li><li><strong>Identity Platform</strong>: Maintains ownership and team membership information</li></ul><h4>2 Entity Enrichment</h4><p>MDS implements a hydration contract for each event type. When an event arrives, MDS:</p><ol><li>Validates the event schema</li><li>Calls the source system’s API to fetch the complete, current state</li><li>Transforms the response into a normalized entity</li></ol><p>This design has a crucial property: the order of events doesn’t matter. MDS always fetches the latest facts from the source of truth. This pattern decouples the event stream from state consistency. If the event bus drops a message or delivers it out of order, the next event corrects the state. The event stream becomes a notification of change rather than a log of changes.</p><p>This notification of change pattern has a few important tradeoffs. On the plus side, it keeps producers simple, makes us robust to out-of-order or dropped events, and ensures that MDS can always reconcile to the latest state by reading from the source of truth. The tradeoff is that we place additional read load on source systems during hydration and need to be deliberate about rate limiting, caching, and backoff in our enrichment workers so that we don’t overload them.</p><p>For our ranking model example, when the model_instance_created event arrives, MDS calls the Model Registry API: GET /api/v1/instances/ranking-model-v5-20XX0101</p><p>The registry responds with a full descriptor. Example response (key fields only):</p><pre>{<br>  &quot;id&quot;: &quot;ranking-model-v5-20XX0101&quot;,<br>  &quot;pipeline_run_id&quot;: &quot;train-weekly-ranking-20XX0101&quot;,<br>  &quot;owner_emails&quot;: [&quot;alice@netflix.com&quot;],<br>  &quot;labels&quot;: [{&quot;key&quot;: &quot;team&quot;, &quot;value&quot;: &quot;personalization&quot;}],<br>  ...<br>}</pre><h4>3 Data Transformation and Normalization</h4><p>Raw events are heterogeneous and each source system has its own schema and semantics. MDS workers transform these events into a unified entity model with standardized fields.</p><p>Without normalization, downstream consumers would need to understand every source system’s schema. Normalization creates a consistent interface, allowing queries and relationships to work across all entity types. Here is an example.</p><p>Normalized MDS entity:</p><pre>{<br>  &quot;id&quot;: &quot;aip://model/registry/ranking-model-v5-20XX0101&quot;,<br>  &quot;pipeline_run&quot;: &quot;aip://pipeline-run/orchestrator/train-weekly-ranking-20XX0101&quot;,<br>  &quot;entity_type&quot;: &quot;ModelInstance&quot;,<br>  &quot;owners&quot;: [&quot;aip://user/identity/alice&quot;],<br>  &quot;tags&quot;: [{&quot;tag&quot;: &quot;team&quot;, &quot;value&quot;: &quot;personalization&quot;}],<br>  ...<br>}</pre><p>The normalization process standardizes field names and formats. For example, platform-specific IDs become global AIP URIs, owner_emails becomes owners with resolved user URIs, and labels become tags. Foreign keys like pipeline_run_id are transformed into entity references. However, there’s still no reference to which A/B tests are using this model. The Model Registry doesn’t track experiments, and the Experimentation Platform doesn’t track which pipeline produced a given model. This is where knowledge enrichment becomes critical.</p><h4>4 Storage and Indexing</h4><p>Once normalized, entities are persisted to Datomic and immediately indexed in Elasticsearch. This happens synchronously within the event processing flow.</p><p><strong>Datomic for Caching and Relationships</strong><br>Normalized entities are first written to Datomic, which serves as both a local cache and a graph database.</p><p>Why Datomic? Datomic serves as both the system of record for MDS and the working dataset for enrichment processes. Its immutable fact model means we can continuously add relationships without losing the original entity state.</p><p><strong>What we store:</strong></p><ul><li>All entity attributes as facts</li><li>Entity references (foreign keys that may point to entities not yet fully resolved)</li><li>All relationships as reified edges (added by enrichment processes)</li><li>Entity lifecycle state (tracking which entities are fully enriched vs awaiting hydration)</li></ul><p><strong>This enables:</strong></p><ul><li><strong>Complex graph traversals:</strong> Navigate from a model to its features to their data sources in a single query</li><li><strong>Entity relationships:</strong> Join across multiple domains without N+1 query problems</li><li><strong>Flexible schema evolution:</strong> Easy to add new entity types and attributes as the catalog grows</li><li><strong>Progressive enrichment</strong>: Background jobs efficiently identify and process entities requiring additional hydration, enabling gradual graph completion without reprocessing fully enriched entities</li></ul><p>In practice, we use Datomic for relationship-heavy, navigational queries such as:</p><ul><li>Starting from this model instance, show me all upstream datasets and downstream experiments.</li><li>Given this feature, list all consuming models and their owning teams.</li></ul><p>These queries often span multiple hops in the graph and benefit from Datomic’s immutable fact model and efficient joins across entity relationships.</p><p><strong>Elasticsearch for Discovery</strong><br>Immediately after writing to Datomic, entities are indexed in Elasticsearch to power fast, full-text search across the catalog.</p><p><strong>What we index:</strong></p><ul><li>Primary fields: Entity name, description, entity type, owner names</li><li>Relationship metadata: Names of related entities (e.g., a model’s features, pipelines, A/B tests) stored in the related field</li><li>Tags: Domain-specific metadata stored as key-value pairs (e.g., <em>team::personalization, env::production, model.state::released</em>)</li></ul><p><strong>Index structure:</strong></p><ul><li>Single entities index: All entity types (models, features, pipelines, etc.) are indexed in one unified index, differentiated by the entityType field</li><li>Separate owners index: Dedicated index for users and groups to enable cross-entity owner searches</li><li>Relevance boosting: Exact name matches score higher than other relevant matches</li></ul><p><strong>This enables:</strong></p><ul><li>Multi-field text search across entity names, descriptions, tags, and related metadata</li><li>Relevance ranking with boosting (exact name matches score significantly higher)</li><li>Complex filtering by entity type, ownership, tags, and domain-specific attributes (stored as tags)</li><li>Fuzzy matching to handle typos and partial queries</li></ul><p>Elasticsearch powers the entry point into the system: users typically start with a free-text search in the AIP Portal (for a model name, a team, or a domain term), and then switch to graph navigation once they land on an entity page. Indexing happens in near real-time as part of the ingestion and enrichment workflows, so changes are usually visible in the Portal with a short delay that is acceptable for interactive use.</p><h4>5 Knowledge Enrichment and Graph Formation</h4><p>Once entity metadata is persisted in Datomic, scheduled background processes take over to discover and materialize relationships. These enrichment jobs run periodically, scanning for uncached or partially resolved entities (entities that exist only as references without full metadata).</p><p>The enrichment workflow:</p><ul><li><strong>Identify candidates:</strong> Find entities marked as uncached or with unresolved references</li><li><strong>Hydrate relationships:</strong> Query source-of-truth systems to fetch related entity details</li><li><strong>Materialize edges:</strong> Write discovered relationships back to Datomic</li><li><strong>Re-index:</strong> Trigger Elasticsearch indexing for updated entities</li><li><strong>Mark as enriched:</strong> Update entity status to prevent redundant processing</li></ul><p>This asynchronous approach allows MDS to handle the computational cost of graph formation without blocking real-time event ingestion. It also enables retry logic and gradual enrichment as new entities become available.</p><p>Because enrichment is asynchronous, newly discovered relationships may appear with a short delay after the underlying entities are created (typically minutes rather than seconds). We track when each entity was last enriched and surface this timestamp in the AIP Portal, so practitioners can reason about staleness and know when it’s safe to rely on a particular relationship for debugging or impact analysis.</p><p><strong>Why enrich?</strong> Source systems are purpose-built and don’t know about entities in other domains. Enrichment discovers and materializes cross-system relationships that enable powerful lineage and impact queries.</p><h4>Example: Connecting Models to A/B Tests</h4><p>When MDS processes a new model instance, background enrichment jobs discover relationships through multi-hop inference:</p><p><strong>Step 1: Direct link to pipeline</strong></p><p>The model references a pipeline_run_id. An enrichment job hydrates the pipeline and discovers its A/B test associations: GET /api/v1/pipeline-runs/train-weekly-ranking-20XX0101</p><p>Response:</p><pre>{<br>&quot;run_id&quot;: &quot;train-weekly-ranking-20XX0101&quot;, &quot;pipeline&quot;:  &quot;weekly-ranking-trainer&quot;,<br>&quot;ab_test_cells&quot;: [<br>   {&quot;test_id&quot;: &quot;12345&quot;,&quot;cell_number&quot;: 2,&quot;cell_name&quot;: &quot;treatment_ranking_v5&quot;}<br> ]<br> ...<br>}</pre><p><strong>Step 2: Discover A/B test context</strong><br>The enrichment job discovers the pipeline ran for A/B test cell #2 and queries the Experimentation Platform for test details: GET /api/v1/tests/12345</p><pre>{<br> &quot;test_id&quot;: &quot;12345&quot;,<br> &quot;name&quot;: &quot;Ranking Model v5 vs v4&quot;,<br> &quot;status&quot;: &quot;ACTIVE&quot;,<br> &quot;cells&quot;: [{&quot;cell_number&quot;: 1, &quot;name&quot;: &quot;control_ranking_v4&quot;}],<br> ...<br>}</pre><p><strong>Step 3: Infer transitive relationships</strong><br>The enrichment job now has the complete chain:</p><ul><li>Model Instance was produced by Pipeline Run</li><li>Pipeline Run was executed for A/B Test Cell #2</li><li>The A/B Test Cell #2 belongs to A/B Test “Ranking Model v5 vs v4”</li><li>Model Instance now gets associated with this A/B Test</li></ul><p>The job writes the inferred relationship back to Datomic and triggers re-indexing, and materializes these edges in the graph. MDS doesn’t just store what it’s told; it derives new knowledge by <em>walking</em> the graph in the background.</p><p><strong>Why this matters:</strong> Without MDS, answering “Which A/B tests are using this model?” requires:</p><ol><li>Looking up the model in the Model Registry</li><li>Finding which pipeline produced it</li><li>Checking the Pipeline Orchestrator for A/B test tags</li><li>Querying the Experimentation Platform for test details</li></ol><p>With the model lifecycle graph, it’s a single query:</p><pre>query {<br>  model(id: &quot;aip://model/registry/ranking-model-v5-20XX0101&quot;) {<br>    name<br>    owners { name }<br>    currentInstance {<br>      version<br>      pipeline {<br>        name<br>        owners { name }<br>      }<br>      features {<br>        edges {<br>          node {<br>            name<br>            data { edges { node { name } } }<br>          }<br>        }<br>      }<br>      associatedAbTests {<br>        name<br>        cells { number name }<br>      }<br>    }<br>  }<br>}</pre><p>The reverse query also works: “What models are being tested in experiment 12345?”</p><h3>Enabling Exploration, Not Just Search</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*j8moOl19CHOfIDRvfnPk5A.png" /></figure><p>With the Model Lifecycle Graph in place, we shift from entity search to entity exploration. Discovery isn’t just about finding a model; It’s about traversing relationships:</p><ul><li>Start with a model, explore its features</li><li>From features, navigate to the core data driving them</li><li>From the data, trace back to the pipelines generating it</li><li>From pipelines, see which teams own and depend on them</li><li>From experiments, understand which models are being tested</li></ul><p>For example, imagine an engineer investigating a degraded engagement metric for a personalization model. They might:</p><ol><li>Start with the model instance powering the affected recommendations in the AIP Portal.</li><li>Inspect the model’s features and follow a suspicious feature to its upstream dataset.</li><li>From the dataset page, see that its pipeline recently had failed runs and identify the owning team.</li><li>Confirm which A/B tests are currently running this model instance to understand which members and surfaces are impacted.</li></ol><p>Before MDS and the Model Lifecycle Graph, this required manual checks across multiple tools (model registry, pipeline orchestrator, experiment platform). Now it’s a contiguous journey in a single interface.</p><p>This graph-based exploration answers questions that were previously impossible:</p><ul><li>Lineage queries: What is the complete lineage of this model, from training data to production experiments?</li><li>Impact analysis: Which models will be affected if I change this feature?</li><li>Usage discovery: Which A/B tests are using this model?</li><li>Dependency mapping: What data sources does my pipeline transitively depend on?</li><li>Deprecation planning: Which entities are no longer being used and can be retired?</li></ul><p>Every entity has deep context: its creation time, ownership, update history, and most importantly, its relationships to other entities.</p><p>The Model Lifecycle Graph is surfaced to practitioners through the AIP Portal, a unified interface that provides full-text search across all entity types, detailed entity pages with navigable relationships, and personalized views for teams and individuals.</p><p>A typical interaction in the AIP Portal looks like:</p><ul><li><strong>Search:</strong> Type a model, feature, dataset, or team name into the single search box backed by Elasticsearch.</li><li><strong>Inspect:</strong> Land on an entity page that shows key metadata (description, owners, domains, tags) alongside a relationships panel.</li><li><strong>Explore:</strong> Click through to related entities (upstream datasets, downstream experiments, and sibling model versions) to navigate the Model Lifecycle Graph without leaving the portal.</li></ul><p>When new entity types are introduced into MDS, the portal automatically provides baseline search, entity pages, and relationship navigation, and we can then layer on domain-specific visualizations (such as model deployment history or dataset version timelines) over time.</p><h3>The Road Ahead: Open Challenges</h3><p>Building the ML lifecycle graph is an ongoing journey. Significant challenges remain, and these represent the future opportunities for us:</p><ul><li><strong>Tool Proliferation:</strong> As new ML tools emerge, we need robust integration patterns that scale. How do we design plugin architectures that make adding new sources seamless? If we don’t keep up with new tools, practitioners will be forced back into fragmented views, and the Model Lifecycle Graph will lose coverage and trust.</li><li><strong>Domain-Specific Visualizations:</strong> Different entity types require distinct visualization experiences. Model pages should display deployment history, A/B test associations, and performance metrics. Feature pages should highlight data lineage and consuming models. Pipeline pages must show execution history, dependencies, and schedules. Dataset pages require versioning timelines and downstream consumers. How do we design a flexible UI framework that allows each entity type to have its own tailored experience while maintaining consistent navigation and interaction patterns across the portal? Without rich, domain-specific experiences, the portal risks becoming a generic catalog rather than a tool that ML practitioners rely on in their daily workflows.</li><li><strong>Metadata Quality:</strong> Today, MDS ensures data consistency through source-of-truth hydration and schema validation at ingestion. Background enrichment jobs continuously infer relationships and materialize entities from source systems. However, challenges remain in ensuring completeness and timeliness at scale. When source systems fail to emit events, when ownership information becomes stale, or when entities lack descriptions and contextual metadata, the graph’s utility degrades. How do we build automated validation and enrichment systems to detect metadata anomalies, suggest missing relationships, and maintain quality benchmarks across millions of entities? Poor or stale metadata erodes practitioner trust: if the graph is incomplete or incorrect, teams will revert to ad hoc knowledge and one-off integrations rather than using MDS as their source of truth.</li><li><strong>Advanced Relationship Inference:</strong> Beyond explicit relationships declared in source systems, how do we infer implicit connections? Can we detect that two models serve similar purposes based on shared features? Can we recommend features based on usage patterns from similar pipelines? We are in the early stages of exploring these ideas. Done well, they would turn MDS from a passive catalog into an active recommendation engine for ML assets, accelerating reuse and reducing duplicate work across domains.</li></ul><h3>Acknowledgments</h3><p>This work represents the collective effort of stunning colleagues across the AI Platform organization: <a href="https://www.linkedin.com/in/emma-carney-6a700b17a/">Emma Carney</a>, <a href="https://www.linkedin.com/in/megan-ren-7b78a81a8/">Megan Ren</a>, <a href="https://www.linkedin.com/in/nadeem-ahmad-80000983/">Nadeem Ahmad</a>, <a href="https://www.linkedin.com/in/poleniuk/">Pat Oleniuk</a>, <a href="https://www.linkedin.com/in/prateekagarwal17/">Prateek Agarwal</a>, <a href="https://www.linkedin.com/in/tikhakobyan/">Tigran Hakobyan</a>, <a href="https://www.linkedin.com/in/yinglao-liu-6b48b6126/">Yinglao Liu</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5cc6d5828bb1" width="1" height="1" alt=""><hr><p><a href="https://netflixtechblog.com/democratizing-machine-learning-at-netflix-building-the-model-lifecycle-graph-5cc6d5828bb1">Democratizing Machine Learning at Netflix: Building the Model Lifecycle Graph</a> was originally published in <a href="https://netflixtechblog.com">Netflix TechBlog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[State of Routing in Model Serving]]></title>
            <link>https://netflixtechblog.com/state-of-routing-in-model-serving-16e22fe18741?source=rss----2615bd06b42e---4</link>
            <guid isPermaLink="false">https://medium.com/p/16e22fe18741</guid>
            <category><![CDATA[ai-platform]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Netflix Technology Blog]]></dc:creator>
            <pubDate>Fri, 01 May 2026 21:03:13 GMT</pubDate>
            <atom:updated>2026-05-01T21:22:25.368Z</atom:updated>
            <content:encoded><![CDATA[<p>By <a href="https://www.linkedin.com/in/nipunk/">Nipun Kumar</a>, <a href="https://www.linkedin.com/in/rajatsshah/">Rajat Shah</a>, <a href="https://www.linkedin.com/in/peterchng/">Peter Chng</a></p><h3>Introduction</h3><p><em>This is the first blog post in a multi-part series that shares technical insights into how our ML model serving infrastructure powers several personalized experiences at scale across various domains (e.g., title recommendations, commerce). In this introductory blog post, we will dive into our domain-independent API abstraction and its traffic routing capabilities that the central ML model serving platform exposes to several domain-specific microservices for model inference. This singular API, or entry point, into the ML model serving platform has significantly increased the speed of innovation for iterating on newer versions of existing ML experiences, as well as enabling completely new product experiences with ML.</em></p><p>Machine Learning use cases powering member experiences on Netflix require rapid iteration and evolution in response to new learnings. The success of our ML model serving infrastructure largely depends on enabling researchers to rapidly experiment with new hypotheses and safely, at scale, release their models into production. Equally important is enabling multiple microservices at Netflix to seamlessly get model inference without exposing the complexities of ML model inference. To achieve this in a uniform and scalable manner, we created a centralized ML serving platform. As of 2025, the platform serves hundreds of model types and versions, netting 1 million requests per second. In this post, we’ll zoom in on a core challenge of any large-scale ML serving system: How to route traffic to the right model instance, on the right cluster shard, for the right user and use case, while preserving a simple abstraction for both client services and model researchers.</p><h3>Background</h3><h3>Models at Netflix</h3><p>To properly frame our discussion, let’s first clarify the distinction between model <em>serving</em> and model <em>inference</em>. At Netflix, the definition of an ML model has historically been somewhat unique. While model <em>inference</em> typically focuses only on an infer(features) -&gt; score capability, models at Netflix act as self-contained workflows that transform inputs to outputs. A “model” encapsulates pre- and post-processing, feature computation logic, and an optional ML-trained component, all packaged in a standard format suitable for use across multiple contexts. We refer to the end-to-end execution of this workflow as model <em>serving</em>. This distinction matters because our routing and API abstractions operate at the level of workflows, not just individual scoring functions.</p><p>A few <em>simplified</em> examples of model serving use cases:</p><p><strong>Use case</strong>: Personalized Continue Watching row on Netflix Homepage</p><ul><li>Input: UserId, Country, Device ID</li><li>Output: Ranked List of movies and shows (aka title): [titleId1, titleId2, titleId3,…]</li></ul><p><strong>Use case</strong>: Payment Fraud Detection</p><ul><li>Input: UserId, Country, Payment Transaction details</li><li>Output: Probability of the transaction being fraudulent</li></ul><p>A typical flow of this serving workflow is depicted below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*V0IaBLQSyADbjdnlhRDJdA.png" /></figure><p>To achieve this higher level of abstraction, the model definition contains a list of facts (raw, unprocessed data or observations built as states in different business workflows) that it needs to compute features, and it relies on the model serving platform to supply these facts at serving time by calling several other microservices. Likewise, during offline training, <a href="https://netflixtechblog.com/evolution-of-ml-fact-store-5941d3231762">Netflix’s ML fact store</a> provides snapshots for bulk access to facilitate feature computation.</p><p>The important takeaway from this model definition is that the calling services only need to provide standard request context (such as userId, country, device), and the relevant domain context (such as titles to rank, or payment transaction for fraud detection), and the model can itself compute features and perform inference as part of the execution flow. This common set of request contexts across domains enables them to share a standard API abstraction and standardizes how various client microservices can uniformly integrate with the serving app. Furthermore, clients are shielded from the model selection and execution, allowing the model architecture and data inputs to evolve with minimal client coordination.</p><p>This post focuses on showcasing the technical details to support this design paradigm. We’ll first describe how we implemented this abstraction with Switchboard, a centralized routing service, and then discuss the operational challenges we encountered at scale and how they led us to the Lightbulb architecture.</p><h3>ML Model Serving Platform Principles</h3><p>We envisioned a central model serving platform for all of Netflix’s member-facing ML Model serving needs. This ambitious effort required principled thinking to provide the right level of abstraction for both the researchers and client applications. The following ideas, which are relevant to the topic of this blog post, ensured that the platform acts as an enabler of rapid ML innovation and limits the exposure of ML model iterations to the client apps:</p><ul><li><strong>Model innovation independent of client apps: </strong>There should be only a one-time integration effort by the calling app with the ML serving platform for a new use case. After that, almost all model iterations, including intermediate model A/B experiments, should be mostly opaque to the calling apps. This implies that the platform should handle tasks such as model selection based on a user’s A/B allocation, fetching additional data needed by experimental models, logging for further training or observability, and more. This also benefits the ML researcher, as they only need to coordinate with one platform for model innovation.</li><li><strong>Decouple clients from model sharding: </strong>Models are distributed across multiple serving compute cluster shards, each with its own Virtual IP (VIP) Address. Various factors, such as traffic patterns, SLAs, model architecture, and CPU/Memory availability, affect model-to-cluster mapping, and changes to this mapping result in changes to the VIP address at which a model is reachable. The serving platform should make clients agnostic to such frequent VIP address changes while ensuring high availability.</li><li><strong>Flexible traffic routing rules: </strong>Support flexible mechanisms to introduce new traffic routing rules. This includes supporting traffic routing based on A/B experiments, providing a knob to slowly shift traffic to new models and VIP addresses, and allowing client overrides.</li></ul><h3>Introducing Switchboard</h3><p>Standard out-of-the-box API Gateway solutions (such as AWS API Gateway, a standalone Service Mesh proxy) did not meet all our requirements. In particular, we needed first-class integration with Netflix’s experimentation platform, the ability to expose gRPC endpoints to clients, and the ability to use rich domain-specific context for routing customizations, which generic proxies were not designed to handle. Furthermore, the platform required customizations to model-specific lifecycle stages (shadow mode, canaries, rollbacks) to enable safe rollouts and migrations.</p><p>Hence, we embarked on building a custom service that serves as a flexible proxy layer for all traffic, handling over 1 million requests per second while maintaining high availability and reliability. We named it Switchboard.</p><p>Switchboard serves as the central entry point for the system, <strong>acting as a mandatory interface </strong>for all clients to access the appropriate model based on their context. Its role is to perform context-aware routing and to apply any configured context enrichment to the model inputs.</p><p>Here is a visual representation of the request flow from different clients to different serving clusters:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*HEV6B_6F5ci3dyoKXyq55A.png" /></figure><h3>Objective Abstraction</h3><p>To support this system design, we introduce the concept of an “Objective”. It’s an Enumeration defined by the serving platform that every request into the system must provide. It has three key purposes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*V6bhyHhYQ4W5baVzvygW9g.png" /></figure><p>In short, an <strong>Objective</strong> is the serving platform’s name for a specific business use case (e.g., ContinueWatchingRanking), which decouples clients from concrete models and guides the platform’s routing and model selection decisions.</p><h3>Key Capabilities of Switchboard</h3><p>To summarize, these are the key capabilities of Switchboard:</p><ol><li><strong>Common Client Abstraction: </strong>Switchboard provides a single point of contact for all our clients’ model needs. When clients wish to consume additional models for new ML applications addressing the same business need, there is no new service dependency to introduce or new clients to manage to make requests to the models. From an ML Ops perspective, this also gives us knobs to control client rate limits across model versions and manage central concurrency limits to deal with bad clients.</li><li><strong>Context-Aware Routing:</strong> Switchboard can route a request based on a rich set of contextual features, such as the user’s current device, locale, ranking surface type (e.g., home page vs. search results), or the current A/B test a user is in.</li><li><strong>Dynamic Traffic Splitting:</strong> It enables real-time traffic splitting for canary deployments and experimentation. This allows engineers to safely roll out a new model version to a small, controlled percentage of users before a full launch.</li><li><strong>Model Versioning and Lifecycle Management:</strong> Switchboard inherently manages concurrent request traffic to multiple versions of the same model. This is crucial for:</li></ol><ul><li><strong>Shadow Mode Testing:</strong> Routing production traffic to a new model version without affecting the user experience, enabling performance comparisons.</li><li><strong>Instant Rollback:</strong> Immediate switching of traffic away from a problematic new model version back to a stable one.</li></ul><p>But is this the whole story? Not quite. Introducing this routing layer adds complexity to our model deployment cycles. In addition, we need a mechanism to collect the context-based routing information from the researchers when they choose to deploy model variants.</p><h3>The Glue — Switchboard Rules</h3><p>Given that Objectives serve as the contract between clients and the serving platform, we needed a way for researchers to attach model variants, experiments, and traffic splits to those Objectives without changing client code. This is where Switchboard Rules comes in.</p><p>The primary UX for model researchers to define models associated with an objective in a flexible manner is a JavaScript configuration, which we call <em>Switchboard Rules</em>. It’s used to produce a set of rules (typically a JSON file) that primarily dictate the following things to the serving platform:</p><ol><li>The default model to use for a given Objective</li><li>A/B experiments to configure for a set of Objectives and the corresponding models to load for those experiments</li><li>Customizations to gradually shift traffic to a new model</li></ol><p>Here is an example of an A/B test rule in the context of the Continue Watching row:</p><pre>/**<br>Configuration rule written by a Model Researcher to add an A/B experiment in the Model Serving system.<br>Cell 1: Uses the default, currently productized model<br>Cell 2 and Cell 3: Use different experimental (candidate) models<br>**/<br><br>function defineAB12345Rule() {<br>    const abTestId = 12345;<br><br>    const objectives = Objectives.ContinueWatchingRanking;<br>    const abTestCellToModel = {<br>        1: {name: &quot;netflix-continue-watching-model-default&quot;},<br>        2: {name: &quot;netflix-continue-watching-model-cell-2&quot;},<br>        3: {name: &quot;netflix-continue-watching-model-cell-3&quot;}<br>    };<br><br>    return {<br>        cellToModel: abTestCellToModel,<br>        abTestId: abTestId,<br>        targetObjectives: [objectives],<br>        modelInputType: constants.TITLE_INPUT_TYPE,<br>        modelType: &#39;SCORER&#39;<br>    };<br>}</pre><p>These rules are consumed by both the Switchboard and the Model Serving clusters. Given these rules, the serving platform components can take various actions, some detailed below:</p><p><strong>Control Plane Flow</strong>:</p><ol><li><strong>Assignment:</strong> Produce model-to-cluster shard assignment.</li><li><strong>Validation:</strong> Load all specified models into the Serving Cluster Shard and validate model dependencies to ensure successful execution.</li><li><strong>Mapping:</strong> Provide the model-to-shard VIP address mapping to Switchboard.</li></ol><p><strong>Data Plane Flow</strong>:</p><ol><li><strong>Allocation:</strong> If the request is for Objective=ContinueWatchingRanking, query the <a href="https://netflixtechblog.com/its-all-a-bout-testing-the-netflix-experimentation-platform-4e1ca458c15">Experimentation Platform</a> for the userId’s cell allocation.</li><li><strong>Model Selection:</strong> Use the allocation and A/B test rule to select the appropriate model.</li><li><strong>Request Routing:</strong> Route the request to the serving cluster shard with the selected model and context.</li><li><strong>Model Execution (on the serving host):</strong> Run the model workflow steps and return the response.</li></ol><p>A key highlight of this setup is the decoupling of the experimentation config from the serving platform code. This includes having an independent release cycle for the rules, separate from the code deployments. <a href="https://netflixtechblog.com/how-netflix-microservices-tackle-dataset-pub-sub-4a068adcc9a">Netflix’s Gutenberg</a> system provides an excellent ecosystem that enables a flexible pub-sub architecture, facilitating proper versioning, dynamic loading, easy rollbacks, and more. Both Switchboard and the Serving Cluster Host subscribe to the same Switchboard Rules configuration.</p><p>To prevent race conditions and ensure proper sync of the dynamic Switchboard Rules configuration, the following flow is considered:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*iSNuD8ZuSC9E2zN-wZdH-A.png" /></figure><h3>Evolving Challenges</h3><p>Switchboard solved the primary problem of improving model iteration and innovation velocity, and provided an excellent ML serving abstraction to over 30 service clients. However, as the system scale increased, a few challenges and problems with this design became apparent:</p><ul><li><strong>Single point of failure: </strong>The presence of Switchboard in the critical request path clearly highlights the risks of shutting down access to all serving hosts in extreme cases, such as unintentional bugs or noisy neighbors sending excessive traffic.</li><li><em>Why this matters: Switchboard became a shared dependency whose failure would degrade or disable multiple ML-powered experiences at Netflix.</em></li><li><strong>Added latency due to additional network hop:</strong> Switchboard in the request path adds between 10–20ms of latency due to serialization-deserialization operations, depending on payload size. Additionally, it further exposes a request to tail latency amplification.</li><li><em>Why this matters: The added latency is unacceptable for some latency-sensitive clients, resulting in end-user impact due to service timeouts.</em></li><li><strong>Reduced Client flexibility</strong>: Switchboard obscures visibility into client request origins from the serving clusters. Consequently, distinguishing data logged for real vs artificial traffic, which is essential for model training, is difficult and requires ongoing customization and increased MLOps overhead.</li><li><em>Why this matters: It makes it harder to do tenant separation and test traffic isolation.</em></li></ul><h3>What Next? — Lightbulb</h3><p>The aforementioned challenges of operating Switchboard at scale forced us to rethink the core implementation while retaining its key features. Our goal was not to throw away Switchboard’s design, but to refactor where and how its responsibilities were executed, keeping the benefits while reducing risk and latency. Particularly:</p><ul><li><em>Common Client Abstraction</em></li><li><em>Decouple clients from model sharding</em></li><li><em>Flexible traffic routing rules</em></li><li><em>Lightweight system client</em></li><li><em>Single place to define model and experimentation config</em></li><li><em>Fast experimentation config propagation</em></li><li><em>Fallback and client-side caching in case of failures</em></li></ul><p>However, we did want to address some of the previous design choices to move forward with:</p><ul><li><strong>Remove the routing service from the direct request path: </strong>Having a single service in the active request path introduces another failure mode and limits fallback flexibility. While routing rules change infrequently, maintaining consistency comes at the cost of increased availability risks.</li><li><strong>Separate model inputs from the request metadata</strong>: In certain cases, the request payload could be quite large. Needing to deserialize and then re-serialize the payload as it flowed through Switchboard to make a routing decision was a significant contributor to latency and increased serving costs.</li><li><strong>Provide better isolation for the routing layer: </strong>Consolidating multiple use cases (tenants) into a single routing cluster poses two main challenges. First, error propagation posed a risk, as a surge of problematic requests from one tenant could cascade errors back to Switchboard, potentially impacting other users. Second, the cluster had to accommodate diverse latency requirements because the requests from different use cases varied significantly in complexity.</li></ul><p>This required some changes in our setup flow: While it largely remained unchanged, however, we created separate components for Routing and Model Selection (Lightbulb):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*wtVpe5xJMNEENitvkd1FPQ.png" /></figure><p>We now take the rules for an Objective and break them into distinct sets of configuration:</p><ul><li><strong>Model Serving Configuration</strong>: This allows us to determine which model should be used at request time, along with the required metadata</li><li><strong>Routing Rules</strong>: Given a model we want to serve at request time, this tells us which VIP the request should be routed to.</li></ul><p>The Data Plane changes also reflect this separation, as we now rely on <a href="https://github.com/envoyproxy/envoy">Envoy</a> to take care of the routing details:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*jbW4NlcnKucGKBi_vNjXbw.png" /></figure><p>Envoy is <a href="https://netflixtechblog.com/zero-configuration-service-mesh-with-on-demand-cluster-discovery-ac6483b52a51">already used</a> for all egress communication between apps at Netflix, and it can route requests to different clusters (VIPs) based on the configurable Routing Rules published from our control plane. However, it lacks the information needed to make routing decisions and the ability to enrich the request body with additional serving parameters required for A/B testing model variants. We introduced Lightbulb to cover this gap:</p><ul><li>Lightbulb consumes the minimal request context, which contains use-case information, and provides the metadata mapping required for routing at the Envoy layer.</li><li>Lightbulb resolves the request context to determine a routingKey configuration along with the <strong>ObjectiveConfig</strong> — this is where we place the model id along with other request-specific configurations required for model execution. This is done to separate the config resolution associated with the request from the placement and routing information needed to reach it on the inference cluster.</li><li>While the routingKey is added to the headers for Envoy proxy to consume, the client adds the ObjectiveConfig parameters to the request itself. This is done to avoid bloating the request headers while passing additional parameters for the model to process the request appropriately.</li><li>The routing of the actual request is performed by the Envoy proxy, which has the metadata to map the routingKey to the actual cluster VIP running the model. Because the routingKey is in a header, this determination can be made with minimal overhead.</li></ul><p>These changes retain the advantages of Switchboard, such as a single integration point, abstraction of model id from use case, context-aware routing, while addressing the challenges we observed over time.</p><h3>Conclusion</h3><p>The evolution from Switchboard to Lightbulb marks a significant architectural refinement in our ML model serving infrastructure. While Switchboard provided the initial abstraction layer critical for rapid innovation, its latency and single-point-of-failure risk posed scaling hurdles. The subsequent adoption of Lightbulb, a decoupled service focused solely on routing metadata, and its integration with Envoy successfully resolved these challenges. This sophisticated new architecture preserves the key benefits — seamless client integration and flexible experimentation — while ensuring reliable, efficient, and scalable delivery of personalized member experiences, positioning us well for future ML growth.</p><p>In future posts in this series, we’ll dive deeper into other aspects of our ML serving platform, including inference and feature fetching, and how they interact with the routing architecture described here.</p><p>Special thanks to <strong>Sura Elamurugu</strong>, <strong>Sri Krishna Vempati</strong>, <strong>Ed Maddox</strong>, and <strong>Sreepathi Prasanna</strong> for their invaluable feedback and partnership in iterating on this idea and bringing this blog post to life.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16e22fe18741" width="1" height="1" alt=""><hr><p><a href="https://netflixtechblog.com/state-of-routing-in-model-serving-16e22fe18741">State of Routing in Model Serving</a> was originally published in <a href="https://netflixtechblog.com">Netflix TechBlog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scaling Camera File Processing at Netflix]]></title>
            <link>https://netflixtechblog.com/scaling-camera-file-processing-at-netflix-6dab2b1e80be?source=rss----2615bd06b42e---4</link>
            <guid isPermaLink="false">https://medium.com/p/6dab2b1e80be</guid>
            <dc:creator><![CDATA[Netflix Technology Blog]]></dc:creator>
            <pubDate>Fri, 24 Apr 2026 15:06:01 GMT</pubDate>
            <atom:updated>2026-04-24T15:06:01.452Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Orchestrating Media Workflows Through Strategic Collaboration</em></p><p>Authors: <a href="https://www.linkedin.com/in/ericreinecke/">Eric Reinecke</a>, <a href="https://www.linkedin.com/in/bhanusrikanth/">Bhanu Srikanth</a></p><h3>Introduction to Content Hub’s Media Production Suite</h3><p>At Netflix, we want to provide filmmakers with the tools they need to produce content at a global scale, with quick turnaround and choice from an extraordinary variety of cameras, formats, workflows, and collaborators. Every series or film arrives with its own creative ambitions and technical requirements. To reduce friction and keep productions moving smoothly, we built <a href="https://netflixtechblog.com/globalizing-productions-with-netflixs-media-production-suite-fc3c108c0a22">Netflix’s Media Production Suite (MPS)</a> with the goal of automating repeatable tasks, standardizing key workflows, and giving productions more time to focus on creative collaboration and craftsmanship.</p><p>A critical part of this effort is how we handle image processing and camera metadata across the hundreds of hours and terabytes of camera footage that Netflix productions ingest on a daily basis. Rather than build every component from scratch, we chose to partner where it made sense–especially in areas where the industry already had trusted, battle-tested solutions.</p><p>This article explores how Netflix’s Media Production Suite integrates with FilmLight’s API (FLAPI) as the core studio media processing engine in Netflix’s cloud compute infrastructure, and how that collaboration helps us deliver smarter, more reliable workflows at scale.</p><h3>Why We Built MPS</h3><p>As Netflix’s production slate grew, so did the complexity of file-based workflows. We saw recurring challenges across productions:</p><ul><li>File wrangling sapping time from creative decision-making</li><li>Inconsistent media handling across shows, regions, or vendors</li><li>Difficult to audit manual processes that are prone to human error</li><li>Duplication of effort as teams reinvented similar workflows for each production</li></ul><p>Content Hub Media Production Suite was created to address these pain points. MPS is designed to:</p><ul><li>Bring efficiency, consistency, and quality control to global productions</li><li>Streamline media management and movement from production through post-production</li><li>Reduce time spent on non-creative file management</li><li>Minimize human error while maximizing creative time</li></ul><p>To achieve this, MPS needed a robust, flexible, and trusted way to handle camera-original media and metadata at scale.</p><h3>The Right Tool for the Job</h3><p>From the start, we knew that building a world-class image processing engine in-house is a significant, long-term commitment: one that would require deep, continuous collaboration with camera manufacturers and the wider industry.</p><p>When designing the system, we set out some core requirements:</p><ul><li><strong>Inspect, trim, and transcode original camera files and metadata</strong> for any Netflix production with trusted color science</li><li><strong>Support a wide variety of cameras and recording formats</strong> used worldwide while staying current as new ones are released</li><li><strong>Run well in our paved-path encoding infrastructure,</strong> enabling us to take advantage of proven compute and storage scalability with robust observability</li></ul><p>FilmLight develops Baselight and Daylight, which are commonly used in the industry for color grading, dailies, and transcoding. Their FilmLight API (FLAPI) allows us to use that same media processing engine as a backend API.</p><p>Rather than duplicating that work, we chose to integrate. FilmLight became a trusted technology partner, and FLAPI is now a foundational part of how MPS processes media.</p><h3>The Media Processing Engine</h3><p>MPS is not a single application; it’s an ecosystem of tools and services that support Netflix productions globally. Within that ecosystem, the FilmLight API plays the following key roles.</p><ol><li>Parsing camera metadata on ingest</li></ol><p>Productions upload media to Netflix’s <strong>Content Hub</strong> with <a href="https://theasc.com/society/ascmitc/asc-media-hash-list">ASC MHL</a> (Media Hash List) files to ensure completeness and integrity of initial ingest, but soon after, it’s important to understand the technical characteristics of each piece of media. We call this workflow phase “inspection.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OYBDXSUJ6D0tVXVGO3w5TQ.jpeg" /><figcaption>Footage ingested with MPS is inspected using FLAPI and all metadata is indexed and stored</figcaption></figure><p>At this stage, we:</p><ul><li>Use FLAPI to gather <strong>camera metadata</strong> from the original camera files</li><li>Conform the workflow critical fields to <strong>Netflix’s normalized schema</strong></li><li>Make it <strong>searchable and reusable</strong> for downstream processes</li></ul><p>This metadata is integral to:</p><ul><li>Matching footage based on timing and reel name for automated retrieval</li><li>Debugging (e.g., why a shot looks a certain way after processing)</li><li>Validations and checks across the pipeline</li></ul><p>FLAPI provides consistent, camera-aware insight into footage that may have originated anywhere in the world. Additionally, since we’re able to package FLAPI in a Docker image, we can deploy almost identical code to both cloud and our production compute and storage centers around the world, ensuring a consistent assessment of footage wherever it may exist.</p><p>2. Generating VFX plates and other deliverables</p><p>Visual effects workflows constantly push image processing pipelines to their absolute limits. For MPS to succeed, it must generate images with <strong>accurate</strong> framing, <strong>consistent</strong> color management, and <strong>correct</strong> debayering/decoding parameters — all while maintaining rapid turnaround times.</p><p>To achieve this, we leverage Netflix’s <a href="https://netflixtechblog.com/the-netflix-cosmos-platform-35c14d9351ad">Cosmos</a> compute and storage platform and use open standards to provide predictable and consistent creative control.</p><p>At this phase, we use the FilmLight API to:</p><ul><li><strong>Debayer</strong> original camera files with the correct format-specific decoding parameters</li><li>Crop and de-squeeze images using <strong>Framing Decision Lists (ASC FDL)</strong> to ensure spatial creative decisions are preserved</li><li><strong>Apply ACES Metadata Files (AMF), </strong>providing repeatable color pipelines from dailies through finishing</li><li>Generate <strong>an array of media deliverables</strong> in varied formats</li></ul><p>These processes are automated, repeatable, and auditable. We deliver AMFs alongside the OpenEXRs to ensure recipients know exactly what color transforms are already applied, and which need to be applied to match dailies.</p><p>Because we use FilmLight’s tools on the backend, our workflow specialists can use Baselight on their workstations to manually validate pipeline decisions for productions before the first day of principal photography.</p><h3>The Media Processing Factory in the Cloud</h3><p>Finding an engine that competently processes media in line with open standards is an important part of the equation. To maximize impact, we want to make these tools available to all of the filmmakers we work with. Luckily, we’re no strangers to scaled processing at Netflix, and our <a href="https://netflixtechblog.com/the-netflix-cosmos-platform-35c14d9351ad">Cosmos compute platform</a> was ready for the job!</p><h4>Cloud-first integration</h4><p>The traditional model for this kind of processing in filmmaking has been to invest in beefy computers with large GPUs and high-performance storage arrays to rip through debayering and encoding at breakneck speed. However, constraints in the cloud environment are different.</p><p>Factors that are essential for tools in our runtime environment include that they:</p><ul><li>Are <strong>packageable as Serverless Functions in Linux Docker images</strong> that can be quickly invoked to run a single unit of work and shut down on completion</li><li>Can <strong>run on CPU-only instances</strong> to allow us to take advantage of a wide array of available compute</li><li>Support <strong>headless invocation </strong>via Java, Python, or CLI</li><li><strong>Operate statelessly,</strong> so when things do go wrong, we can simply terminate and re-launch the worker</li></ul><p>Operating within these constraints lets us focus on increasing throughput via parallel encoding rather than focusing on single-instance processing power. We can then target the sweet spot of the cost/performance efficiency curve while still hitting our target turnaround times.</p><p>When tools are API-driven, easily packaged in Linux containers, and don’t require a lot of external state management, Netflix can quickly integrate and deploy them with operational reliability. FilmLight API fit the bill for us. At Netflix, we leverage:</p><ul><li><strong>Java</strong> and <strong>Python</strong> as the primary integration languages</li><li><strong>Ubuntu-based Docker images</strong> with Java and Python code to expose functionality to our workflows</li><li><strong>CPU instances in the cloud and local compute centers</strong> for running inspection, rendering, and trimming jobs</li></ul><p>While FLAPI also supports GPU rendering, CPU instances give us access to a much wider segment of Netflix’s vast encoding compute pool and free up GPU instances for other workloads.</p><p>To use FilmLight API, we bundle it in a package that can be easily installed via a Dockerfile. Then, we built Cosmos Stratum Functions that accept an input clip, output location, and varying parameters such as frame ranges and AMF or FDL files when debayering footage. These functions can be quickly invoked to process a single clip or sub-segment of a clip and shut down again to free up resources.</p><h4>Elastic scaling for production workloads</h4><p>Production workloads are inherently spiky:</p><ul><li>A quiet day on set may mean minimal new footage to inspect.</li><li>A full VFX turnover or pulling trimmed OCF for finishing might require <strong>thousands of parallel renders</strong> in a short time window.</li></ul><p>By deploying FLAPI in the cloud as functions, MPS can:</p><ul><li>Allocate compute on demand and release it when our work queue dies down</li><li>Avoid tying capacity to a fixed pool of local hardware</li><li>Smooth demand across many types of encoding workload in a shared resource pool</li></ul><p>This elasticity lets us swarm pull requests to get them through quickly, then immediately yield resources back to lower priority workloads. Even in peak production periods, we avoid the pain of manually managing render queues and prioritization by avoiding fixed resource allocation. All this means <strong>lightning-fast</strong> turnaround times and <strong>less anxiety</strong> around deadlines for our filmmakers.</p><h3>Designed for Seasoned Pros and Emerging Filmmakers</h3><p>Netflix productions range from highly experienced teams with very specific workflows to newer teams who may be less familiar with potential pitfalls in complex file-based pipelines.</p><p>MPS is designed to support both:</p><ul><li>Industry veterans who need to configure precise, bespoke workflows and trust that underlying image processing will respect those decisions.</li><li>Productions without a color scientist on staff — those who benefit from guardrails and sane defaults that help them avoid common workflow issues (e.g., mismatched color transforms, inconsistent debayering, or incomplete metadata handling).</li></ul><p>The partnership with FilmLight lets Netflix focus on workflow design, orchestration, and production support, while FilmLight focuses on providing competent handling of a wide variety of camera formats with world-class image science!</p><h3>Collaboration and Co-Evolution</h3><p>Netflix aimed to integrate MPS into a wider tool ecosystem by developing a comprehensive solution based on emerging open standards, rather than making MPS a self-contained system. Integrating FLAPI into our system requires more than an API reference–it requires ongoing partnership. FilmLight worked closely with Netflix teams to:</p><ul><li>Align on <strong>feature roadmaps</strong>, particularly around new camera formats and open standards</li><li>Validate the <strong>accuracy and performance</strong> of key operations</li><li>Debug <strong>edge cases</strong> discovered in large-scale, real-world workloads</li><li><strong>Evolve the API</strong> in ways that serve both Netflix and the wider industry</li><li>Create <strong>a positive feedback cycle with open standards</strong> like ACES and ASC FDL to solve for gaps when the rubber hits the road</li></ul><p>One example of this has been with the implementation of <a href="https://draftdocs.acescentral.com/background/about-aces-2/">ACES 2</a>. FilmLight’s developers quickly provided a roadmap for support. As our engineering teams collaborated on integration, we also provided feedback to the ACES technical leadership to quickly address integration challenges and test drive updates in our pipeline.</p><p>This collaborative relationship–built on open communication, joint validation, and feedback to the greater industry–is how we routinely work with FilmLight to ensure we’re not just building something that works for our shows, but also driving a healthy tooling and standards ecosystem.</p><h3>Impact</h3><p>While much of this work takes place behind the scenes, its impact is felt directly by our productions. Our goal with building MPS is for producers, post supervisors, and vendors to experience:</p><ul><li>Fewer delays caused by missing, incomplete, or incorrect media</li><li>Faster turnaround on VFX plates and other technical deliverables</li><li>More predictable, consistent handoffs between editorial, color, and VFX</li><li>Less time spent troubleshooting technical issues, and more time focused on creative review</li></ul><p>In practice, this often shows up as the absence of crisis: the time a VFX vendor doesn’t have to request a re-delivery, or the time editorial doesn’t have to wait for corrected plates, or the time the color facility doesn’t have to reinvent a tone-mapping path because the AMF and ACES pipeline are already in place.</p><h3>Looking Ahead</h3><p>As camera technology, codecs, open standards, and production workflows continue to evolve, so will MPS. The guiding principles remain:</p><ul><li>Automate what’s repeatable</li><li>Centralize what benefits from standardization</li><li>Partner where deep domain expertise already exists</li></ul><p>The integration with FilmLight API is one example of this philosophy in action. By treating image processing as a specialized discipline and collaborating with a trusted industry partner, Netflix is delivering smarter, more reliable workflows to productions worldwide.</p><p>At its core, this partnership supports a simple goal: reduce manual workflow and tool management, giving filmmakers more time to tell stories.</p><h3>Acknowledgements</h3><p>This project is the result of collaboration and iteration over many years. In addition to the authors, the following people have contributed to this work:</p><ul><li>Matthew Donato</li><li>Prabh Nallani</li><li>Andy Schuler</li><li>Jesse Korosi</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6dab2b1e80be" width="1" height="1" alt=""><hr><p><a href="https://netflixtechblog.com/scaling-camera-file-processing-at-netflix-6dab2b1e80be">Scaling Camera File Processing at Netflix</a> was originally published in <a href="https://netflixtechblog.com">Netflix TechBlog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Human Infrastructure: How Netflix Built the Operations Layer Behind Live at Scale]]></title>
            <link>https://netflixtechblog.com/the-human-infrastructure-how-netflix-built-the-operations-layer-behind-live-at-scale-33e2a311c597?source=rss----2615bd06b42e---4</link>
            <guid isPermaLink="false">https://medium.com/p/33e2a311c597</guid>
            <category><![CDATA[netflix]]></category>
            <category><![CDATA[incident-response]]></category>
            <category><![CDATA[live-operations]]></category>
            <category><![CDATA[live-broadcast-technology]]></category>
            <category><![CDATA[live-streaming]]></category>
            <dc:creator><![CDATA[Netflix Technology Blog]]></dc:creator>
            <pubDate>Fri, 17 Apr 2026 15:01:02 GMT</pubDate>
            <atom:updated>2026-04-18T14:20:23.499Z</atom:updated>
            <content:encoded><![CDATA[<p>By: <a href="https://www.linkedin.com/in/brett-axler-11577142/">Brett Axler</a>, <a href="https://www.linkedin.com/in/casper-choffat-005833b/">Casper Choffat</a>, and <a href="https://www.linkedin.com/in/alexlowry355/">Alo Lowry</a></p><p>In the three years since our first Live show, <a href="https://www.netflix.com/title/80167499"><em>Chris Rock: Selective Outrage</em></a>, we have witnessed an incredible expansion of our live content slate and the live operations that support it. From modest beginnings of streaming just one show per month, we are now capable of streaming over nine shows in a single day, reaching tens of millions of concurrent members. This post pulls back the curtain on the Live Operations teams that enable this rapid scale.</p><h3>Humble Beginnings</h3><p>In March 2023, the engineers who built Netflix’s first live streaming pipeline also operated it. There was no dedicated operations team or formal command center. All of our incident response playbooks were written for SVOD, and SLAs were not designed for the speed of live. For the first live shows on the platform, the engineers who designed what is described in <a href="https://netflixtechblog.com/behind-the-streams-live-at-netflix-part-1-d23f917c2f40">earlier parts of this series</a> monitored dashboards on laptops, coordinated over Slack, and troubleshot in real time while millions of members watched.</p><p>The physical setup matched the operational workflows: improvised. Temporary control rooms were put together in conference rooms. For larger events, Netflix rented third-party broadcast facilities, hardware control panels, multiviewers, and communication panels — the kind of infrastructure that established broadcast networks had built over decades. Every show was a team effort. Engineers and leadership at all levels were involved in every event. Each live show, regardless of size, was a massive effort to launch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tibjLPNWGd0PP43Y8Idjag.jpeg" /><figcaption>Netflix’s Early Live Operations</figcaption></figure><p>Last month, in March 2026, Netflix streamed the World Baseball Classic live to members in Japan. 47 matches over two weeks, with peak concurrent viewership exceeding 17.9 million for a single game, operations running 24/7 from permanent facilities in Los Gatos and Los Angeles, with international coverage extending to Tokyo. In March alone, Netflix launched approximately 70 live events. That is three events shy of the total number Netflix streamed live in all of 2024. The technical systems that make this possible have been covered in detail across this series. What hasn’t been told is the operational story: the people, procedures, and facilities Netflix built to run those systems in real time, under pressure, with no ability to pause or roll back.</p><h3>The Architecture of Live Operations</h3><p><strong>The Architecture of Live Operations: Evolving the Broadcast Operations Center</strong></p><p>When a technology company transitions into live broadcasting, it faces a unique challenge: blending traditional broadcast television practices with massive-scale live-streaming engineering. At the heart of this intersection is the <strong>Broadcast Operations Center (BOC)</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tG3zfmPX5ciRafvtnj9phQ.jpeg" /><figcaption>The Transmission Operations Center in Los Angeles</figcaption></figure><p>The BOC serves as the critical “cockpit” for live events. It is the physical command center where a fully produced video feed is received directly from a stadium or venue and then handed off to the live streaming infrastructure. Everything from signal ingest, inspection, and conditioning to closed-captioning, graphics insertion, and ad management happens within these walls. By utilizing a hub-and-spoke model with highly redundant architectures, such as dual internet circuits and SMPTE 2022–7 seamless switching technologies, the BOC replaces direct, vulnerable paths from the venue to the live streaming pipeline, making each live event highly repeatable and far less dependent on the quirks of individual event locations.</p><p><strong>Securing the Signal: Reliability from the Venue</strong> Before the BOC can work its magic, we have to guarantee the video and audio feeds actually survive the journey from the production site to our facility. To ensure absolute reliability from the venue, Netflix enforces strict specifications for live signal contribution.</p><p>For any show-critical feed, meaning the primary feed our members will watch live, we require three completely discrete transmission paths. We utilize a strict hierarchy of approved transmission methods, prioritizing dedicated video fiber and single-feed satellite links, followed by dedicated enterprise-grade internet and robust SRT contribution systems.</p><p>We don’t just rely on redundant transport lines; we require full hardware redundancy out of the production truck itself. This includes using separate router line cards and discrete transmission hardware to prevent any single point of failure. Furthermore, every single piece of transmission hardware at the venue must be powered by two discrete power sources, protected by uninterruptible power supply (UPS) batteries, and surge-conditioned.</p><p>Finally, before we ever go live to millions of viewers, our operators execute exhaustive “FACS/FAX” (facilities checks) testing during rehearsals and before every show. This involves running specialized Audio/Video sync tests, latency tests, and quality tests to guarantee perfect audio and video synchronization, validating closed captions, and touring the backup switcher inputs.</p><p><strong>Building the Human Infrastructure:</strong> Building the human operational model to run a facility like the BOC didn’t happen overnight. For a platform scaling from its very first live comedy special to streaming over 400 global events a year, the operational strategy had to undergo a massive, multi-year evolution.</p><p><strong>Phase 1: The “All-Hands” Engineering Era.</strong> In the earliest days of live streaming, there was no dedicated operations team or formal broadcast operations center. The software engineers who wrote the code and built the live-streaming infrastructure were the same people manually operating the events on launch night. Every show was an “all-hands-on-deck” scenario. While this raw, startup-style approach worked for initial milestones, having core developers manually set up and tear down software configurations for every single broadcast was fundamentally incapable of scaling.</p><p><strong>Phase 2: The Shift to Specialized Engineering (SOEs and BOEs).</strong> To separate event execution from core software development, the operational model matured to introduce specialized engineering teams. First, the <strong>Streaming Operations Engineering (SOE)</strong> team was established. These are highly skilled streaming engineers whose sole focus is to configure the full event on the live pipeline and support it during the broadcast. By having SOEs act as the first line of escalation, the core software developers were freed up to focus on building new live-streaming pipeline features.</p><p>However, as the physical broadcast facilities grew, it became clear that supporting the streaming pipeline wasn’t enough; the physical broadcast hardware and facility workflows needed dedicated oversight too. To solve this, <strong>Broadcast Operations Engineers (BOEs)</strong> were introduced to work alongside the SOEs. The BOE acts as the primary escalation point for all physical broadcast facility and hardware issues, overseeing the operation of all shows during a given shift.</p><p><strong>Phase 3: The “Co-Pilot” Control Room Model.</strong> With specialized engineers in place to handle the deep technical infrastructure, the day-to-day operation of the actual video and audio feeds was handed over to dedicated operators. Initially, the Broadcast Control Rooms were structured much like an airplane cockpit.</p><p>This approach utilized a <strong>“first and second captain” workflow</strong>, pairing two Broadcast Control Operators (BCOs) together to run a single event, functioning exactly like a pilot and co-pilot. This collaborative model allowed for intense focus and high-quality execution, making it the ideal setup for running just one or two live events per day. However, as the ambition grew to stream up to 10 concurrent events a day for massive global tournaments, a 1:1 scale of pairing operators simply required too much space and manpower. A new model had to be adopted.</p><p><strong>Phase 4: The Transmission Operations Center (TOC) Fleet Model.</strong> To manage high-density event days and continuous tournament coverage, the workflow was completely reimagined with the launch of the <strong>Transmission Operations Center (TOC) model</strong>. Rather than treating every live broadcast as an isolated launch in its own room, the TOC treats live events like a fleet. It centralizes operations and distinctly separates the traditional broadcast functions from the streaming functions to maximize human efficiency.</p><p>The TOC model divides the labor across three highly specialized, tiered roles:</p><ul><li><strong>Transmission Control Operator (TCO):</strong> The TCO is responsible for managing all inbound signals arriving from the event venues, such as fiber optic, SRT, and satellite feeds. They ensure these incoming feeds meet strict quality, latency, and operational thresholds. Thanks to centralized dashboarding, a single TCO can manage up to <strong>five events concurrently</strong>.</li><li><strong>Streaming Control Operator (SCO):</strong> While the TCO handles what comes <em>in</em>, the SCO manages what goes <em>out</em>. They oversee all outbound feeds, including the streams heading to the live streaming pipeline and any syndication feeds sent to third parties for commercial distribution. Like the TCOs, SCOs can manage up to <strong>five events concurrently</strong>.</li><li><strong>Broadcast Control Operator (BCO):</strong> With the inbound and outbound transmission mechanics handled by the broader TOC, the BCO is able to focus entirely on the creative and qualitative execution of the event. Operating on a <strong>strict 1:1 ratio</strong> (one operator per event), the BCO seamlessly switches between backup inbound feeds if an issue arises, ensures audio and video remain in perfect synchronization, and performs rigorous quality control. They also monitor critical metadata, such as closed captions and digital ad-insertion messages (SCTE), right before the final polished feed is handed into the live streaming pipeline.</li></ul><p><strong>The Big Bet Exception.</strong> While the fleet-style TOC model enables immense concurrency for daily programming, the most critical, high-visibility events, like major holiday football games, utilize a specialized <strong>Big Bet Model</strong>. For these flagship broadcasts, an entire Broadcast Operations Center is dedicated exclusively to a single event. This hyper-focused environment strips away the multi-event ratios, providing operators with advanced instrumentation and dedicated facility engineers to ensure the absolute highest level of reliability for events where failure is simply not an option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n3WWOX4zg06kGyTMWE7mcg.png" /><figcaption>Operational Workflow at a Glance (Courtesy of Melissa “Mouse” Merencillo)</figcaption></figure><h3>The Live Command Center (LCC)</h3><p>The Live Command Center (LCC) is not an MCR (Master Control Room). Nor is it a traditional Network Operations Center (NOC). The LCC holds the end-to-end view of quality, health metrics, and reliability for every live stream — from signal ingest at the production venue through cloud encoding, CDN delivery, and playback on member devices — and coordinates the human response when any part of that chain breaks.</p><p>What makes this hard is the data and speed requirements. Standard monitoring tools incur propagation delays of minutes. However, during a live stream, a signal degradation that goes undetected for three minutes can affect millions of members before any mitigation begins. The LCC runs a purpose-built observability stack, the Live Control Center, that aggregates telemetry from across the entire pipeline in near real time: concurrent viewer counts, start failure rates, rebuffer ratios, CDN health, encoder status, and signal path health from the contribution feed forward.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LN1ncCZL_HLrVfgLiBNK0g.png" /><figcaption>Live Control Center (Courtesy of Chris Carey)</figcaption></figure><p>During live events, the system ingests up to 38 million events per second. The LCC’s job is to make that volume of data meaningful and actionable for the small team of operators watching it live.</p><p>Two roles staff the LCC leading up to and during live events. LCC Operations Leads are the shift supervisors and incident commanders. They triage anomalies, make escalation decisions, and own the incident response process from detection through resolution.</p><p>Live Technical Launch Managers (TLMs) function as air traffic controllers: they maintain cross-functional context across more than 45 technical, product, and services teams from encoding, CDN, and playback to social media, customer service, and security teams. TLMs start coordinating with these teams months and sometimes years ahead of a live event to ensure escalation paths and playbooks are in place when the LCC needs to translate a CDN engineer’s concern into a product decision at 2am while a game is still in progress. Together, these roles form the operational leadership layer that keeps engineers focused on building rather than watching dashboards.</p><p>The live operations teams rank shows by three categories:</p><ul><li><strong>Low-Profile Events:</strong> These are lightweight, often lack new features, and anticipate low viewership. They are typically managed with a small team of 1–2 operators and automated alerting.</li><li><strong>High-Profile Events:</strong> These are mid-tier events that warrant more attention due to their size, unique features, or anticipated viewership.</li><li><strong>Big Bet Events:</strong> These represent the highest operational weight, such as an NFL game, with massive viewership expectations and special features. They require the full support of the LCC: a fully staffed physical operations room for the entire duration, active incident command structures, and key engineering teams on standby to support their specific product areas.</li></ul><p>In addition to a show’s event category, the TLMs deployed a Live Operational Level (LOL) model that helps engineers determine whether they need to be on standby, live online, or even in the LCC for any given show.</p><p>Based on the show’s event category, special features, expected viewership, and overall risk, non-operational teams are put into one of four categories:</p><p><strong>Red:</strong> Non-operational teams must remain online for the duration of the event. This is most often seen in large boxing matches and sporting events, such as the NFL Christmas Day games.</p><p><strong>Orange:</strong> Non-operational teams are required to check in online ~30 minutes prior to show and are asked to monitor the health of their systems through the first commercial breaks until the LCC releases them to LOL Yellow.</p><p><strong>Yellow:</strong> Non-operational teams are not required to be online, but should be reachable by page in 2 minutes. Special PagerDuty rotations and verifications are in place to ensure these teams are reachable.</p><p><strong>Grey:</strong> Business as usual. Teams will be reached out to by their normal pager rotation if their help is needed during the show.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sgk7Y5OYAvbfxL7xRxTQbA.png" /><figcaption>Visual Representation of LOL Levels (Courtesy of Gemini Nano Banana Pro)</figcaption></figure><p>By tiering events, Netflix ensures that resource allocation is proportionate to operational needs, preventing a continuous “crisis” mentality and allowing our non-operational partners to focus on their day jobs.</p><p>As of April 2026, most engineering teams are Yellow or Grey, with Ops and Site Reliability Engineers making up most of the teams online to support shows, in addition to engineers performing feature tests.</p><h3>Building the Model</h3><p>The first lesson from 2023 was straightforward: what worked for one show a month would not work for ten shows a week. The engineers who built the pipeline were also the ones operating it, which meant the people best positioned to fix problems were also the ones most likely to be paged at 2am. There was no operational layer to absorb that load.</p><p>In 2024, Netflix streamed 72 live events and began building the team that would eventually run them. The first version of the LCC looked nothing like it does today: a cluster of desks, monitors on stands, and laptops running dashboards, set up in the middle of the office. The TLM team was stood up to own cross-functional coordination for live launches and began formalizing the runbooks, event tiering structure, and incident management protocols that would later enable Netflix to scale operations to support hundreds of shows per year.</p><p>By the time Jake Paul vs. Mike Tyson and the first NFL Christmas Games arrived, the LCC had moved into a dedicated conference room, and partnerships with device and labs teams were producing more effective monitoring tools. But the biggest operational lesson of that period came from communications.</p><p>For Tyson/Paul, Netflix had over 300 people online across engineering, product, and business functions. Some people were online because their support was needed, while many others were just excited to be part of it. Coordinating that many people over Slack and Zoom during an active event with 64 million concurrent streams was unmanageable.</p><p>That experience drove the implementation of a <strong>squad model</strong>: defined teams with clear roles, scoped communication channels, and a single escalation path into the LCC. Around the same time, the LCC began integrating with IP-based communications systems, finally bridging the gap between the command center and the Broadcast Operations Center that had been operating largely in a fractured parallel until then.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*07i_xA6sf2_m05Giu3Dqsw.png" /><figcaption>Visual Representation of Squad Operations Model (Courtesy of Gemini Nano Banana Pro)</figcaption></figure><p>2025 brought 220 live events and a permanent LCC facility, along with a dedicated operations team, the Live Command Center Operations Leads. With the growing number of shows, TLMs were getting spread thin, spending more than half their week operating shows late into the evening and over weekends, then getting called back into the office at 9 am to lead critical launch meetings. The addition of the LCC Ops Leads resolved the bandwidth issue by separating planning and operations into distinct roles within a single centralized team.</p><p>As the slate continued to grow and large series like the World Baseball Classic and FIFA Women’s World Cup were announced, the vendor-operator model was introduced, creating an elastic workforce that could scale up for large series events without carrying full-time headcount year-round to support peak capacity. <strong>The key enabler was documentation</strong>: standardized runbooks and onboarding materials detailed enough that a trained operator could reach full effectiveness within their first week. WWE RAW became a weekly operation, normalizing what had previously felt exceptional. By early 2026, multi-event days were no longer a test of capacity but had become the expected operating condition.</p><p>The next chapter is international. Netflix has begun standing up regional Live Operations Center coverage to support live events outside North America, with EMEA operations soon running out of London. The model draws on the same runbooks, tooling, and escalation structures developed in Los Gatos, with follow-the-sun shift handoffs connecting EMEA and US teams across time zones. Looking further ahead, Netflix is planning to bring the LCC and BOC under one roof — a single integrated facility that combines broadcast operations and cloud monitoring into a unified space. The physical separation between those two functions has always introduced friction at the seams. Closing it is the logical next step.</p><h3>Operational Principles for Live at Scale</h3><p>Building a live operations discipline means accepting one constraint above all others: you cannot optimize for efficiency before you have built for reliability.</p><p>Netflix designed for quality first: Standardized runbooks, tiered event structures, pre-documented failure modes, so the 50th show runs as smoothly as the fifth. Off-the-shelf monitoring tools with propagation delays don’t meet that bar. The Netflix Live Control Center and Live Control Room platforms exist because observability at live scale is a product decision that demands the same design rigor as the pipeline it monitors, turning millions of telemetry events per second into something a small team can act on in real time. Technical systems and human systems have to scale together, and the most reliable incident response plan is always the one written before anyone needs it.</p><p>The operational model is also a cultural one. Bringing contingent operators into a proprietary tech stack requires deliberate onboarding design. The vendor model only works when documentation is built to be followed confidently by someone new within their first week. <strong>Beyond process, the most durable parts of how Netflix runs live operations reflect something the </strong><a href="https://jobs.netflix.com/culture"><strong>Netflix culture memo</strong></a><strong> makes explicit: the best ideas come from anywhere.</strong> In practice, that means frontline operators catching issues that engineers miss, vendor staff surfacing workflow friction that improves the system for everyone who follows, and a team that treats candid feedback as standard practice rather than an exception. The technology, the slate, and the scale keep changing. The discipline stays current by staying curious and iterating on the tools, the runbooks, and the team.</p><h3>Conclusion: What’s Next</h3><p>With 2026 already off to a successful start in operational scaling, we’re excited to shift our focus to the upcoming launch of our new Live Broadcast Operations Center in Los Angeles and our new Live Operations Center (LOC) in West London. The LOC will initiate Netflix’s follow-the-sun coverage as live content continues to grow with over 400 live events in 2026, including the launch of 24/7 linear free-to-air broadcast channels with TF1 this summer. On the technical front, further development of automated alerting tools and monitoring by exception will continue to reduce operations’ manual workload.</p><p>In 2023, the engineers led the operations. By 2026, they had developed systems that mostly ran themselves, with a dedicated operational team ensuring they operated smoothly for millions of members. The technology behind Netflix’s Live content has been documented throughout this series, but what runs alongside the tech stack is a set of operational principles, rehearsed incident management processes, and monitoring infrastructure that had to be created from scratch and continues to develop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7KV_D2VSRlja_fWmHmuOBw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sc4doCe3-h3mi7V9trxBbQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dZKV2OIroXQRYA6UZBZAEw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w6eGAv10BZWqNBVXNCvqRA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y-iRMBW0Ae2YDiDjNzwq-Q.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dPoOkp75Rjy5CRskFQBoQQ.jpeg" /></figure><p>A special thanks to Te-Yuan Huang, Rob Saltiel, Tara Kozuback, Chris Carey, Di Li, Patrick Li, Anne Aaron, and Melissa “Mouse” Merencillo for their support on this article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33e2a311c597" width="1" height="1" alt=""><hr><p><a href="https://netflixtechblog.com/the-human-infrastructure-how-netflix-built-the-operations-layer-behind-live-at-scale-33e2a311c597">The Human Infrastructure: How Netflix Built the Operations Layer Behind Live at Scale</a> was originally published in <a href="https://netflixtechblog.com">Netflix TechBlog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Evaluating Netflix Show Synopses with LLM-as-a-Judge]]></title>
            <link>https://netflixtechblog.com/evaluating-netflix-show-synopses-with-llm-as-a-judge-6269251e6f28?source=rss----2615bd06b42e---4</link>
            <guid isPermaLink="false">https://medium.com/p/6269251e6f28</guid>
            <dc:creator><![CDATA[Netflix Technology Blog]]></dc:creator>
            <pubDate>Fri, 10 Apr 2026 16:26:01 GMT</pubDate>
            <atom:updated>2026-04-13T14:26:33.614Z</atom:updated>
            <content:encoded><![CDATA[<p>by <a href="https://www.linkedin.com/in/gabrielaalessio/">Gabriela Alessio</a>, <a href="https://www.linkedin.com/in/cameronntaylor/">Cameron Taylor</a>, and <a href="https://www.linkedin.com/in/cwolferesearch/">Cameron R. Wolfe</a></p><h3>Introduction</h3><p>When members log into Netflix, one of the hardest choices is what to watch. The challenge isn’t a lack of options — <em>there are thousands of titles</em> — but finding the most intriguing one is complex and deeply personal. To help, we surface <a href="https://netflixtechblog.com/artwork-personalization-c589f074ad76">personalized promotional assets</a>, especially the show synopsis — <em>a brief description highlighting key plot elements, with cues like genre or talent</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A2j9Xni86SVnF_VyjFNwfw.png" /></figure><p>Strong synopses help members scan, understand, and choose. Poor synopses frustrate, mislead, and drive abandonment. Ensuring high-quality synopses is essential, but scaling quality validation is hard. We host hundreds of thousands of synopses, usually with multiple variants per show. We need to ensure quality at scale so every member gets a consistently great experience every time they read a synopsis. This approach helps us scale high‑quality synopsis coverage for our rapidly expanding catalog, enabling greater speed and coverage without sacrificing quality.</p><p>This report outlines our LLM-based approach for evaluating synopsis quality. Using recent advances in agents, reasoning, and LLM-as-a-Judge, we score four key synopsis quality dimensions, achieving 85%+ agreement with creative writers. Additionally, we show that higher LLM judge quality is correlated with key streaming metrics, <em>allowing us to proactively identify and fix impactful issues weeks or months before a show debuts on Netflix</em>.</p><h3>The Making of a “Good” Synopsis</h3><p>Writing high-quality synopses requires creative expertise. Our expert creative leads are best positioned to craft the creative approaches and define quality standards. However, AI can help us consistently evaluate these expert-driven quality criteria at scale. Synopsis quality at Netflix, which our system aims to predict, is viewed along two dimensions:</p><ol><li><em>Creative Quality</em>: members of our creative writing team assess synopsis quality according to our internal writing guidelines and rubrics.</li><li><em>Member Implicit Feedback</em>: we measure the relative impact of a particular show synopsis on core streaming metrics.</li></ol><p>These two definitions of quality capture distinct and important aspects of quality, one focused upon creative excellence and the other upon utility to members.</p><h4>Creative Quality</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KzbYGovn903y_ZGysqdnYw.png" /></figure><p>For this project, we evaluate synopses against a subset of our creative writing quality rubric — <em>the same criteria to which human writers would adhere</em>. These quality rubrics change over time as quality standards evolve. Given Netflix’s distinctive voice and elevated editorial standards, the quality bar is high. Each criterion has extensive guidelines with examples across regions, genres, and synopsis types.</p><p><strong>Human evaluation.</strong> We began by partnering with a group of creative writing experts to iteratively refine our definition of creative quality. We initially labeled ~1,000 diverse synopses, where three expert writers scored each against the criteria and explained their ratings. Due to the subjectivity of the task, early instance-level agreement was low. To reach a better consensus, we conducted calibration rounds (~50 synopses per round), surfaced disagreements, and evolved our quality scoring guidelines. Key interventions that were found to improve agreement include:</p><ul><li>Using binary scores (instead of 1–4 Likert scores).</li><li>Allowing writers to reference past examples.</li><li>Maintaining a searchable taxonomy of common errors.</li></ul><p><strong>Golden evaluation data. </strong>After eight calibration rounds, writer agreement reached ~80%. To further stabilize labels, we used a model-in-the-loop consensus where:</p><ul><li>Multiple writers score each synopsis.</li><li>An LLM, guided by the rubric, aggregates to a final label.</li><li>Writers review cases with substantial disagreement.</li></ul><p>The result is a golden set of ~600 synopses with binary, criteria-level scores and explanations — <em>our North Star for aligning an LLM judge with expert opinion</em>.</p><h4>Member Implicit Feedback</h4><p>Netflix gauges implicit member feedback on a synopsis with two metrics:</p><ol><li><em>Take Fraction</em>: how often members who see a title’s synopsis choose to start watching it.</li><li><em>Abandonment Rate</em>: how often members start a title but stop watching soon after.</li></ol><p>Higher take fraction indicates more choosing, while lower abandonment suggests authentic, non-misleading presentation. Both of these metrics have been validated via A/B testing to serve as short-term behavioral proxies for long-term member retention. As part of evaluating our system, we also study the ability of LLM-derived quality scores to predict short-term engagement metrics. This step confirms that our scores capture behaviorally meaningful signals and assesses our ability to forecast member response to a given synopsis.</p><h3>Scaling Quality Scoring with LLM-as-a-Judge</h3><p>We begin our experiments by creating simple, per-criteria prompts that:</p><ol><li>Supply criterion-specific show metadata.</li><li>Summarize the relevant quality guidelines.</li><li>Use <a href="https://arxiv.org/abs/2205.11916">zero-shot chain-of-thought prompting</a> to elicit an explanation.</li><li>Request a binary decision for the synopsis.</li></ol><p>Using a single prompt to evaluate all quality criteria is found to overload the LLM and yields poor performance — <em>dedicated judges for each criteria perform better</em>. Because criteria are unique, each task has its own setup, but there are some shared components:</p><ul><li>We use the same LLM for all criteria.</li><li>The judge always outputs an explanation before its final score.</li><li>Final scores are binary.</li></ul><p>Due to our use of binary scoring, judges can be evaluated with simple accuracy metrics over the golden dataset. Next, we summarize the experiments that led to our final system.</p><p><strong>Prompt optimization.</strong> Because LLMs are sensitive to prompt phrasing, we apply <a href="https://arxiv.org/abs/2305.03495">Automatic Prompt Optimization (APO)</a> over a ~300-sample dev set. Scoring guidelines are provided as additional context to the prompt optimizer. After APO, we manually refine candidate prompts with the help of an LLM, yielding initial prompts with accuracies shown below. These prompts work well for some criteria (e.g., precision) but poorly for others (e.g., clarity), highlighting criterion-specific nuances.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*voqhaot2_6G67DSzH0rFzQ.png" /></figure><p><strong>Improved reasoning.</strong> Many failures of our initial system arise due to a lack of accurate reasoning through highly-subjective evaluation examples. To improve reasoning accuracy, we leverage two forms of inference-time scaling:</p><ul><li><em>Longer rationales</em>: increase the length of the rationale or explanation generated by the LLM prior to producing a final score.</li><li><em>Consensus scoring</em>: sample several outputs from the LLM and aggregate their scores to produce the final result.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aEMhMA1OHAGkrvQ0Ljhesg.png" /></figure><p><strong>Tiered rationales.</strong> Using tone as an example, we tested whether longer rationales are helpful by defining three rationale length tiers (shown above) and comparing their accuracies. Accuracy rises with longer rationales but returns are diminishing. Medium rationales noticeably outperform short ones, while long rationales offer only a slight additional gain; see below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ER-gjiA0IhaYFLr1EchOuA.png" /></figure><p>Longer rationales improve performance but degrade human-readability, which is problematic given that explanations are key pieces of evidence for creative experts. As a solution, we adopt tiered rationales: <em>the judge reasons at any length but concisely summarizes its reasoning process prior to the final score. </em>Tiered rationales preserve the benefits of extended reasoning, make outputs easier to inspect, and even benefit scoring accuracy. For example, our tone evaluator improves from 86.55% to 87.85% binary accuracy when using tiered rationales.</p><p><strong>Consensus scoring.</strong> We can also allocate more inference-time compute by sampling multiple outputs per synopsis and aggregating their scores. We aggregate via a rounded average to ensure that the final score remains binary. For tone and clarity criteria with tiered rationales, 5× consensus scoring yields a clear accuracy boost as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U7YSyivmXC_M_kw51-tl-g.png" /></figure><p>Consensus scoring on the precision evaluator, which uses a vanilla (short) chain-of-thought, yields no benefit. As an explanation, we notice that longer rationales increase variance in scores across multiple outputs, while short rationales yield consistent scores. Consensus may be most useful for evaluators with longer rationales, where it helps to stabilize score variance. When shorter rationales are used, all scores tend to be the same, making consensus less meaningful.</p><p><strong>What about reasoning models?</strong> While our setup elicits reasoning from a standard LLM, we also explored quality scoring with true reasoning models (i.e., models that generate long reasoning trajectories prior to final output). For tone, using a reasoning model with 5× consensus yields improving accuracy with increasing reasoning effort, even outperforming tiered rationales at the highest reasoning effort; see below. However, we skip reasoning models in our final system, as they significantly increase inference costs for only a marginal performance gain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D9Ph4ASfjx5pzdfx5EnODQ.png" /></figure><p><strong>Agents-as-a-Judge for factuality.</strong> Synopses have four common types of factuality errors:</p><ol><li>Incorrect plot information.</li><li>Incorrect metadata (e.g., genre, location, release date).</li><li>Incorrect on- or off-screen talent.</li><li>Incorrect award information.</li></ol><p>Detecting these factuality errors requires comparing the synopsis to ground-truth context, where necessary context varies per criteria. For example, plot information requires a plot summary or script, while award information needs a list of awards. As we have learned, simplicity drives reliability: <em>too much context or too many criteria harms accuracy</em>. Motivated by this idea, we adopt factuality agents, where each agent evaluates one narrow aspect of factuality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oXnk59qsQPASZAgTnPi0HA.png" /></figure><p>An agent receives context tailored to one facet of factuality and produces both a rationale and a binary factuality score. The final score of the Agents-as-a-Judge system is the minimum factuality score across agents — <em>any failed aspect yields an overall fail</em>. All rationales are fed to an LLM aggregator to produce a combined rationale to accompany the final score. As shown below, leveraging factuality agents significantly benefits scoring accuracy. Further benefits are achieved by using tiered rationales and consensus scoring within each agent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_aZe60Sa1dwWvPKIH7YRgQ.png" /></figure><p><strong>Final system. </strong>In summary, our automatic evaluation system uses a combination of standard LLM-as-a-Judge, tiered rationales, consensus scoring, and Agents-as-a-Judge to maximize binary scoring accuracy for each criteria. A summary of the techniques used for each criteria and the associated binary scoring accuracy is provided below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qZmJgN46QRLYpEhtlJutEQ.png" /></figure><h3>Member Validation of LLM-as-a-Judge</h3><p>Beyond expert agreement, we also study how LLM-as-a-Judge scores relate to member behavior. This analysis serves two goals:</p><ul><li>Further validating LLM-judge accuracy.</li><li>Linking creative quality to member-perceived quality.</li></ul><p>Framed as predictors of member outcomes, LLM judges help us assess how promotional assets affect viewing and determine which creative attributes matter most to members discovering content they enjoy. To perform this analysis, we take advantage of the fact that most shows have multiple, personalized synopses (i.e., a synopsis “suite”). Using this suite, we can measure the causal effect of synopsis selection on metrics like take fraction and abandonment rate.</p><p><strong>Our methodology. </strong>We correlate synopsis performance (take fraction or abandonment) with LLM quality scores. Specifically, within each show s, we relate changes in a synopsis’s LLM score to changes in its performance, normalizing by the show-level standard deviation and clustering standard errors by show; see below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4-wIexhYKeqcMyf-a0TqIg.png" /></figure><p>β captures the average association between within-show changes in LLM score and changes in performance. While we don’t have clean, experimental variation in LLM scores, this analysis still validates predictive value and practical utility.</p><p><strong>Member-focused results.</strong> We report correlations for individual LLM criteria and a “Weighted Score” that combines all criteria to reduce noise and maximize signal from behavioral data. As shown below, results show promising prediction of take fraction and abandonment. Precision and clarity are especially predictive, and the weighted score provides a statistically useful signal of higher take and lower abandonment. In short, LLM evaluators capture factors that matter to members, making them a valuable tool for monitoring synopsis quality and engagement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HnRJo-DOrH9ifgekC5xq6A.png" /></figure><h3>Closing Remarks</h3><p>The LLM-as-a-Judge system used to evaluate show synopses at Netflix is the result of extensive experimentation grounded in both creative expertise and member outcomes. Building an automatic evaluation system that works reliably in practice is hard, and the approach we have described reflects countless lessons learned through iteration to improve accuracy and scalability. We have validated the system extensively with human evaluation at both the system and component levels, and we have shown that its outputs correlate with key streaming metrics. As a result, we are confident that it captures the dimensions of synopsis quality that matter most — both creatively and from the member perspective — which has driven its widespread adoption in the Netflix synopsis authoring workflow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6269251e6f28" width="1" height="1" alt=""><hr><p><a href="https://netflixtechblog.com/evaluating-netflix-show-synopses-with-llm-as-a-judge-6269251e6f28">Evaluating Netflix Show Synopses with LLM-as-a-Judge</a> was originally published in <a href="https://netflixtechblog.com">Netflix TechBlog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Answering the Same Question Twice: Interval-Aware Caching for Druid at Netflix Scale]]></title>
            <link>https://netflixtechblog.com/stop-answering-the-same-question-twice-interval-aware-caching-for-druid-at-netflix-scale-22fadc9b840e?source=rss----2615bd06b42e---4</link>
            <guid isPermaLink="false">https://medium.com/p/22fadc9b840e</guid>
            <category><![CDATA[apache-druid]]></category>
            <category><![CDATA[cache]]></category>
            <dc:creator><![CDATA[Netflix Technology Blog]]></dc:creator>
            <pubDate>Mon, 06 Apr 2026 22:15:14 GMT</pubDate>
            <atom:updated>2026-04-06T22:15:13.989Z</atom:updated>
            <content:encoded><![CDATA[<p><em>By </em><a href="https://www.linkedin.com/in/sykesb/"><em>Ben Sykes</em></a></p><p>In a <a href="https://netflixtechblog.com/how-netflix-uses-druid-for-real-time-insights-to-ensure-a-high-quality-experience-19e1e8568d06">previous post</a>, we described how Netflix uses Apache Druid to ingest millions of events per second and query trillions of rows, providing the real-time insights needed to ensure a high-quality experience for our members. Since that post, our scale has grown considerably.</p><p>With our database holding over 10 trillion rows and regularly ingesting up to 15 million events per second, the value of our real-time data is undeniable. But this massive scale introduced a new challenge: queries. The live show monitoring, dashboards, automated alerting, canary analysis, and A/B test monitoring that are built on top of Druid became so heavily relied upon that the repetitive query load started to become a scaling concern in itself.</p><p>This post describes an experimental caching layer we built to address this problem, and the trade-offs we chose to accept.</p><h3><strong>The Problem</strong></h3><p>Our internal dashboards are heavily used for real-time monitoring, especially during high-profile live shows or global launches. A typical dashboard has 10+ charts, each triggering one or more Druid queries; one popular dashboard with 26 charts and stats generates 64 queries per load. When dozens of engineers view the same dashboards and metrics for the same event, the query volume quickly becomes unmanageable.</p><p>Take the popular dashboard above: 64 queries per load, refreshing every 10 seconds, viewed by 30 people. That’s 192 queries per second from one dashboard, mostly for nearly identical data. We still need Druid capacity for automated alerting, canary analysis, and ad-hoc queries. And because these dashboards request a rolling last-few-hours window, each refresh changes slightly as the time range advances.</p><p>Druid’s built-in caches are effective. Both the full-result cache and the per-segment cache. But neither is designed to handle the continuous, overlapping time-window shifts inherent to rolling-window dashboards. The full-result cache misses for two reasons.</p><ul><li>If the time window shifts even slightly, the query is different, so it’s a cache miss.</li><li>Druid deliberately refuses to cache results that involve realtime segments (those still being indexed), because it values deterministic, stable cache results and query correctness over a higher cache hit rate.</li></ul><p>The per-segment cache does help avoid redundant scans on historical nodes, but we still need to collect those cached segment results from each data node and merge them in the brokers with data from the realtime nodes for every query.</p><p>During major shows, rolling-window dashboards can generate a flood of near-duplicate queries that Druid’s caches mostly miss, creating heavy redundant load. At our scale, solving this by simply adding more hardware is prohibitively expensive.</p><p>We needed a smarter approach.</p><h3>The Insight</h3><p>When a dashboard requests the last 3 hours of data, the vast majority of that data, everything except the most recent few minutes, is already settled. The data from 2 hours ago won’t change.</p><p>What if we could remember the older portions of the result and only ask Druid for the part that’s actually new?</p><p>This is the core idea behind a new caching service that understands the structure of Druid queries and serves previously-seen results from cache while fetching only the freshest portion from Druid.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8bFAtFl8Z5pwEyoOgK54ag.png" /></figure><h3><strong>A Deliberate Trade-Off</strong></h3><p>Before diving into the implementation, it’s worth being explicit about the trade-off we’re making. Caching query results introduces some staleness, specifically, up to 5 seconds for the newest data. This is acceptable for most of our operational dashboards, which refresh every 10 to 30 seconds. In practice, many of our queries already set an end time of now-1m or now-5s to avoid the “flappy tail” that can occur with currently-arriving data.</p><p>Since our end-to-end data pipeline latency is typically under 5 seconds at P90, a 5-second cache TTL on the freshest data introduces negligible additional staleness on top of what’s already inherent in the system. We decided it was better to accept this small amount of staleness in exchange for significantly lower query load on Druid. But a 5s cache on its own is not very useful.</p><h3>Exponential TTLs</h3><p>Not all data points are equally trustworthy. In real-time analytics, there’s a well-known late-arriving data problem. Events can arrive out of order or be delayed in the ingestion pipeline. A data point from 30 seconds ago might still change as late-arriving events trickle in. A data point from 30 minutes ago is almost certainly final.</p><p>We use this observation to set cache TTLs that increase exponentially with the age of the data. Data less than 2 minutes old gets a minimum TTL of 5 seconds. After that, the TTL doubles for each additional minute of age: 10 seconds at 2 minutes old, 20 seconds at 3 minutes, 40 seconds at 4 minutes, and so on, up to a maximum TTL of 1 hour.</p><p>The effect is that fresh data cycles through the cache rapidly, so any corrections from late-arriving events in the most recent couple of minutes are picked up quickly. Older data lingers much longer, because our confidence in its accuracy grows with time.</p><p>For a 3-hour rolling window, the exponential TTL ensures the vast majority of the query is served from the cache, leaving Druid to only scan the most recent, unsettled data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oyLRzcOO7otVniQM6khD6g.png" /></figure><h3><strong>Bucketing</strong></h3><p>If we were to use a single-level cache key for the query and interval, similar to Druid’s existing result-level cache, we wouldn’t be able to extract only the relevant time range from cached results. A shifted window means a different key, which means a cache miss.</p><p>Instead, we use a map-of-maps. The top-level key is the query hash without the time interval; the inner keys are timestamps bucketed to the query granularity (or 1 minute, whichever is larger) and encoded as big-endian bytes so lexicographic order matches time. This enables efficient range scans; fetching all cached buckets between times A and B for a query hash. A 3-hour query at 1-minute granularity becomes 180 independent cached buckets, each with its own TTL; when the window shifts (e.g., 30 seconds later), we reuse most buckets from cache and only query Druid for the new data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6DL-4Lpu_CqfZBVmF2rNvg.png" /></figure><h3><strong>How It Works</strong></h3><p>Today, the cache runs as an external service integrated transparently by intercepting requests at the Druid Router and redirecting them to the cache. If the cache fully satisfies a request, it returns the result; otherwise it shrinks the time interval to the uncached portion and calls back into the Router, bypassing the redirect to query Druid normally. Non-cached requests (e.g., metadata queries or queries without time group-bys) pass straight through to Druid unchanged.</p><p>This intercepting proxy design allows us to enable or disable caching without any client changes and is a key to its adoption. We see this setup as temporary while we work out a way to better integrate this capability into Druid more natively.</p><p>When a cacheable query arrives, those that are grouping-by time (timeseries, groupBy), the cache performs the following steps.</p><p><strong>Parsing and Hashing.</strong> We parse each incoming query to extract the time interval, granularity, and structure, then compute a SHA-256 hash of the query with the time interval and parts of the context removed. That hash is the cache key: it encodes <em>what</em> is being asked (datasource, filters, aggregations, granularity) but not <em>when</em>, so the same logical query over different overlapping time windows maps to the same cache entry. There are some context properties that can alter the response structure or contents, so these are included in the cache-key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QaeamWjRYGEQkW6t-XePJw.png" /></figure><p><strong>Cache Lookup.</strong> Using the cache key, we fetch cached points within the requested range, but only if they’re contiguous from the start. Because bucket TTLs can expire unevenly, gaps can appear; when we hit a gap, we stop and fetch all newer data from Druid. This guarantees a complete, unbroken result set while sending at most one Druid query, rather than “filling gaps” with multiple small, fragmented queries that would increase Druid load.</p><p><strong>Fetching the Missing Tail.</strong> On a partial cache hit (e.g., 2h 50m of a 3h window), we rebuild the query with a narrowed interval for the missing 10 minutes and send only that to Druid. Since Druid then scans just the recent segments for a small time range, the query is usually faster and cheaper than the original.</p><p><strong>Combining.</strong> The cached data and fresh data are concatenated, sorted by timestamp, and returned to the client. From the client’s perspective, the response looks identical to what Druid would have returned, same JSON format, same fields.</p><p><strong>Asynchronous Caching.</strong> The fresh data from Druid is parsed into individual time-granularity buckets and written back to the cache asynchronously, so we don’t add latency to the response path.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k3uoqCFgzbRZEuiNo_Rlzw.png" /></figure><h3>Negative Caching</h3><p>Some metrics are sparse. Certain time buckets may genuinely have no data. Without special handling, the cache would treat these empty buckets as gaps and re-query Druid for them every time.</p><p>We handle this by caching empty sentinel values for time buckets where Druid returned no data. Our gap-detection logic recognizes these empty entries as valid cached data rather than missing data, preventing needless re-queries for naturally sparse metrics.</p><p>However, we’re careful not to negative-cache trailing empty buckets. If a query returns data up to minute 45 and nothing after, we only cache empty entries for gaps <em>between</em> data points, not after the last one. This avoids incorrectly caching “no data” for time periods where events simply haven’t arrived yet, which would exacerbate the chart delays of late arriving data.</p><h3>The Storage Layer</h3><p>For the backing store, we use Netflix’s <a href="https://netflixtechblog.com/introducing-netflixs-key-value-data-abstraction-layer-1ea8a0a11b30">Key-Value Data Abstraction Layer (KVDAL)</a>, backed by Cassandra. KVDAL provides a two-level map abstraction, a natural fit for our needs. The outer key is the query hash, and the inner keys are timestamps. Crucially, KVDAL supports independent TTLs on each inner key-value pair, eliminating the need for us to manage cache eviction manually.</p><p>This two-level structure gives us efficient range queries over the inner keys, which is exactly what we need for partial cache lookups: “give me all cached buckets between time A and time B for query hash X.”</p><h3><strong>Results</strong></h3><p>The biggest win is during high-volume events (e.g., live shows): when many users view the same dashboards, the cache serves most identical queries as full hits, so the query rate reaching Druid is essentially the same with 1 viewer or 100. The scaling bottleneck moves from Druid’s query capacity to the much cheaper-to-scale cache, and with ~5.5 ms P90 cache responses, dashboards load faster for everyone.</p><p>On a typical day, 82% of real user queries get at least a partial cache hit, and 84% of result data is served from cache. As a result, the queries that reach Druid scan much narrower time ranges, touching fewer segments and processing less data, freeing Druid to focus on aggregating the newest data instead of repeatedly re-querying historical segments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S2tG3E2KlGIujSaEg4oetA.png" /></figure><p>An experiment validated this, showing about a 33% drop in queries to Druid and a 66% improvement in overall P90 query times. It also cut result bytes and segments queried, and in some cases, enabling the cache reduced result bytes by more than 14x. Caveat: the size of these gains depends heavily on how similar and repetitive the query workload is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*B-j0CnKKr5caFQRI8zVZ1A.png" /></figure><h3>Looking Ahead</h3><p>This caching layer is still experimental, but results are promising and we’re exploring next steps. We’ve added partial support for templated SQL so dashboard tools can benefit without writing native Druid queries.</p><p>Longer term, we’d like interval-aware caching to be built into Druid: an external proxy adds infrastructure to manage, extra network hops, and workarounds (like SQL templating) to extract intervals. Implemented inside Druid, it could be more efficient, with direct access to the query planner and segment metadata, and benefit the broader community without custom infrastructure. We’d likely ship it as an opt-in, configurable, result-level cache in the Brokers, with metrics to tune TTLs and measure effectiveness. Please leave a comment if you have a use-case that could benefit from this feature.</p><p>More broadly, this strategy, splitting time-series results into independently cached, granularity-aligned buckets with age-based exponential TTLs, isn’t Druid-specific and could apply to any time-series database with frequent overlapping-window queries.</p><h3>Summary</h3><p>As more Netflix teams rely on real-time analytics, query volume grows too. Dashboards are essential at our scale, but their popularity can become a scaling bottleneck. By inserting an intelligent cache between dashboards and Druid, one that understands query structure, breaks results into granularity-aligned buckets, and trades a small amount of staleness for much lower Druid load, we’ve increased query capacity without scaling infrastructure proportionally, and hope to deliver these benefits to the Druid community soon as a built-in Druid feature.</p><p>Sometimes the best way to handle a flood of queries is to stop answering the same question twice.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22fadc9b840e" width="1" height="1" alt=""><hr><p><a href="https://netflixtechblog.com/stop-answering-the-same-question-twice-interval-aware-caching-for-druid-at-netflix-scale-22fadc9b840e">Stop Answering the Same Question Twice: Interval-Aware Caching for Druid at Netflix Scale</a> was originally published in <a href="https://netflixtechblog.com">Netflix TechBlog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>