Netflix TechBlog | Medium Note

Netflix TechBlog | Medium

Netflix Tech Blog offers insights into how Netflix handles technology. They provide research on data science, engineering, design, and technology innovations. They showcase their innovations, like their proprietary content delivery network and provide insights into their service reliability efforts.

Thread Of Notes

Netflix aims to connect members with content they'll love through personalized visual assets like artwork and video previews. A significant challenge arises with new titles, where insufficient interaction data prevents effective personalization, a problem known as the cold-start issue. Traditionally, models treated assets as opaque IDs, relying on popularity heuristics until enough data accumulated. This meant personalization for new content was delayed, impacting the discovery experience.Netflix's solution involves using multimodal embeddings to allow models to "see" and "hear" the assets. By encoding artwork with CLIP, a pre-trained image-text model, assets gain visual understanding. This CLIP embedding is concatenated with the asset's ID embedding, creating a richer representation that captures visual themes and talent. This enables personalization based on member preferences for visual styles, even before the asset has any interaction history, facilitating knowledge transfer across titles.This approach also enables model consolidation, merging separate models for different artwork canvases into a single unified model. Because CLIP embeddings are largely invariant to cropping and resizing, near-identical renderings of artwork map to similar vectors. This pooling of interaction signals across canvases, especially benefiting low-data canvases, allows a single model to personalize all artwork placements. To address data imbalance across canvases, reward-based weighting is used, prioritizing interactions based on their long-term value rather than impression volume.The effectiveness of this approach was validated through offline evaluations using inverse propensity scoring and large-scale A/B tests. Combining image embeddings with a unified model (V3) significantly outperformed models with only one of these improvements. This combined approach proved crucial during a major Netflix home-screen redesign, where a dominant canvas with minimal historical data was introduced. The unified model with CLIP embeddings successfully personalized content for this new layout, showing statistically significant gains in discovery metrics and streaming hours, highlighting the power of multimodal embeddings for overcoming the cold-start problem.
CdXz5zHNQW_HJCpS7bDND.png
Netflix built a Real-Time Distributed Graph to power real-time insights for their internal partners, and the third part of this blog series focuses on querying the graph efficiently. The graph is a complex network of billions of nodes and edges, and querying it requires a fast and flexible serving layer. The authors discuss the challenges of querying the graph, including handling a wide range of access patterns and supporting both shallow-wide and deep-narrow queries. They explain how they designed a serving layer to efficiently query the graph, using a breadth-first approach and asynchronous composition to minimize latency. The authors also discuss the importance of caching, opt-in enrichments, and eventual consistency in the design of the query layer. The query layer is composed of three layers: the Graph Query Service, the Storage Abstraction Layer, and the Enrichment Layer, which work together to execute queries efficiently. The authors walk through an example query to demonstrate how the query layer works in practice, highlighting the importance of reading and interpreting the request, reading from storage efficiently, executing traversal with breadth-first levels, running many operations in parallel, filtering smartly, and making repeat queries faster with caching. The goal of the query layer is to complete queries in under 100ms, and the authors demonstrate how their design achieves this goal. The query layer is designed to handle tens of thousands of queries per second, each potentially different, and the authors discuss the trade-offs they made in designing the query layer to achieve this level of performance. Overall, the authors provide a detailed overview of the design and implementation of the query layer, highlighting the challenges and trade-offs involved in building a high-performance query layer for a large-scale distributed graph. The query layer is a critical component of the Real-Time Distributed Graph, and the authors' design and implementation have enabled Netflix to power real-time insights for their internal partners.
CdXz5zHNQW_1lL53FS8TQ.png
Netflix offers a wide range of features and content types across various devices, but hardware limitations can restrict certain features on specific devices. To address this, the company has developed a comprehensive device capability data model to understand device capabilities and ensure the best user experience. The data model integrates feature flags from internal systems, enabling smarter feature management across the global device landscape. A cumulative table is used to store information about device capabilities, such as screen resolutions, video profiles, and RAM size, making it ideal for analytics and reporting. The table is structured to capture the latest state of each device and its associated capabilities, allowing for efficient processing of information. For aggregate analytics, a histogram table is used to capture active device counts over the past 28 days, broken down by device model and software version. This table also records the number of devices supporting specific capabilities, enabling detailed distribution analysis. The histogram data can be used to analyze the distribution of external display capabilities, such as the percentage of devices supporting HD or UHD profiles. By leveraging these datasets, Netflix has built analytical products to provide a comprehensive view of feature reach, including 4K Ultra HD, Netflix Spatial Audio, and Cloud Gaming. The company uses data-driven insights to make informed decisions about which features to enable on specific devices, ensuring both performance and reliability.
Recommendations are a crucial part of the Netflix experience, and the company has been using complex production models that rely on thousands of hand-crafted features and specialized architectures. However, these models are costly to maintain and update, and the company is looking for more efficient and effective solutions. Large language models have shown promise in this area, but they are not yet production-ready and often have limitations such as over-recommending popular content and ignoring business constraints. To address this, Netflix built GenRec, an LLM-backed recommendation ranker that post-trains an internal foundation LLM on Netflix-specific data and objectives. GenRec verbalizes user histories, item metadata, and context as text and uses a catalog-aware scoring head to rank items. The model is trained with a multi-objective loss that combines ranking, language, and reward signals to align with business goals and long-term member satisfaction. GenRec has shown statistically significant improvements in both short-term and long-term online metrics compared to a well-tuned production ranker, while using only a small fraction of the labeled data and input signals. The model is served on Netflix's internal LLM stack using vLLM, and the company has implemented strategies to control serving cost, such as using smaller models, aggressive context compaction, and prefill-only inference. Overall, GenRec represents a significant step towards a more LLM-centric future for recommendation at Netflix, and its success has the potential to transform the way the company approaches recommendation and personalization. The model's ability to learn from natural language inputs and generate personalized rankings has the potential to improve the user experience and increase engagement. By leveraging the power of large language models, Netflix can create more effective and efficient recommendation systems that drive business success.
CdXz5zHNQW_VHtw7eOaqU.png
Netflix runs its entire large language model stack internally, managing deployment and inference directly. They integrated this into their existing production environment instead of a separate machine learning silo. This approach involved carefully selecting an inference engine, deciding how models would be packaged, designing the API surface, defining deployment strategies, and enforcing output constraints.The chosen inference engine is vLLM, selected for its operational fit, ability to load custom architectures, extensibility, debuggability, and familiarity among practitioners. Models are packaged using the vLLM backend in Triton to allow dynamic I/O tensor specification, promoting independent evolution of models and frontends. An OpenAI-compatible HTTP frontend was added alongside their existing gRPC interface for broader ecosystem compatibility.For deployment, Netflix uses a Versioned strategy to handle potential schema changes between model versions, allowing consumers to update independently. When model interfaces are stable, the less costly Red-Black deployment strategy is employed. One key operational challenge was slow model startup times, which they addressed by materializing large models on Amazon FSx for faster access.Observability was improved by creating a unified /metrics endpoint that aggregates data from both vLLM and Triton. A significant feature is constrained decoding at scale, implemented via vLLM's custom logits processor. This allows models to generate compliant outputs directly, avoiding post-inference correction.An initial pure-Python implementation of constrained decoding struggled with scaling due to the Global Interpreter Lock (GIL) and sequential processing on the CPU. This only became apparent under high concurrency, leading to significant tail latencies. The system relies on a Java control plane for managing deployment, versioning, and autoscaling. Both real-time and cached batch inference paths are supported by their serving system. This unified system handles the complete downstream consumer flow, including routing, candidate generation, and logging.
CdXz5zHNQW_CmjJjU7Bih.png
Netflix developed a real-time service dependency map to aid engineers in troubleshooting and understanding their distributed architecture. The system combines eBPF network flows, IPC metrics, and distributed tracing into independent graph layers. While the initial version worked locally, production revealed significant scaling challenges, including Kafka consumer lag and memory issues.The core architectural decision was a streaming-first approach, providing near real-time topology updates instead of hourly batch processing. This was crucial for incident response and live event monitoring. To handle millions of flow records per second without data loss, the system employs reactive streams with backpressure, signaling upstream components to slow down when downstream systems are overwhelmed. This ensures graceful degradation rather than crashes or data loss.The architecture uses a multi-layer design with physical storage isolation for network, IPC, and tracing layers, allowing independent optimization. The network layer's ingestion relies on a three-stage distributed aggregation pipeline. Stage 1 performs initial aggregation from Kafka, Stage 2 resolves network intermediaries (like load balancers) into direct application-level dependencies, and Stage 3 handles final aggregation, enrichment with external data, and persistence to the graph database.The three-stage pipeline was a critical evolution from an initial two-stage design, which suffered from "hot nodes" due to data concentration during intermediary resolution and enrichment. Splitting these responsibilities across three stages distributes the workload, preventing bottlenecks. Server-Sent Events (SSE) replaced gRPC for inter-stage communication due to gRPC's performance overhead, which consumed excessive CPU and memory at scale.
CdXz5zHNQW_FXxC4JJL7E.png
The Netflix homepage is a highly personalized and structured interface for content discovery. Traditionally, its generation involved a complex multi-stage pipeline. GenPage, a novel approach, utilizes a single generative transformer model to autoregressively construct the entire homepage. This end-to-end model takes user context as a prompt and generates rows, entities, and layout simultaneously. Key goals include simplifying the recommendation stack, enabling whole-page optimization via reinforcement learning, and improving scalability and flexibility. Production challenges involved real-time serving latency, entity cold start, and maintaining model freshness. GenPage has demonstrated significant improvements in user engagement and reduced serving latency in A/B tests. The data is tokenized into context tokens representing user information and page tokens for the homepage structure. Domain-specific tokenization enhances computational efficiency and product control compared to generic text tokenization. User history, profile, and request context form the prompt, while entities and rows are represented as tokens in the generated page. The system uses a reward system based on user feedback to quantify recommendation value and guide training. GenPage employs a standard decoder-only transformer architecture and follows an LLM-like training recipe of pretraining and post-training. Pretraining uses next-token prediction to teach the model the homepage language, followed by post-training with weighted binary classification or reinforcement learning. This generative approach offers a more integrated and direct path to optimizing the entire Netflix homepage experience.
CdXz5zHNQW_XlipK7GYZj.gif
CdXz5zHNQW_YZ3adN1Eip.gif
Netflix is transitioning its compute infrastructure to a Kubernetes-native model, integrating components like Kueue into its Titus platform. Kueue, a cloud-native job queueing system, has largely replaced the custom logic of their homegrown batch solution, Compute Managed Batch (CMB). Motivations for this migration included CMB's age, the evolution of Kubernetes, and the growing difficulty of adding features like preemption to the existing system. Kueue was chosen over alternatives due to its compatibility with existing Titus scheduling profiles, its adoption momentum, and its native support for features like preemption.The migration, known as Netflix Batch, aimed for zero user impact and no reduction in throughput. The process involved rerouting job submissions to Kueue-enabled Titus cells, with Titus federation handling job distribution. Operator adjustments were minimal, primarily involving a simple UI toggle to enroll tenants into Kueue. This enrollment translates CMB's existing tenant hierarchy and capacity configurations into Kueue's concepts of Cohorts, ClusterQueues, and LocalQueues.Key lessons learned include maintaining API parity with the old system to ensure a smooth user experience and migrating complex use cases early to build confidence. It was also crucial to load test Kueue to ensure it could handle Netflix's high throughput requirements, necessitating adjustments to default configurations. Kueue is now fully operational, managing millions of batch workloads, and has enabled enhanced fair sharing and preemption features. These improvements allow for better utilization of reserved capacity, reduced job starvation, and faster turnaround for critical workloads, significantly increasing average resource utilization.
CdXz5zHNQW_CNU9jjDeMi.png
CdXz5zHNQW_QIKFLIgBao.jpeg
Netflix faced challenges managing millions of data assets with an individual asset-based access control system. Organizational changes caused permission updates to be burdensome and inconsistent, leading to either flooded support teams or overly broad access grants. Workloads were tied to human identities, causing failures when engineers changed roles or left the company, resulting in a "permissions whack-a-mole" issue. To address these problems, Netflix introduced Data Projects, which act as containers for related assets and provide durable, project-specific identities for workloads. This shifts management granularity from individual assets to logical project groupings. Each Data Project has grants and roles, allowing users, groups, or applications to be assigned specific access levels. The project’s Netflix application identity executes workloads, independent of human lifecycles, and can be cryptographically exchanged for AWS IAM roles. A key feature called "gravity" automatically adds newly created assets to their project, ensuring organizational consistency. Data Projects have proven successful in stabilizing critical pipelines and simplifying access management for complex analytics domains. Onboarding involves creating a project, granting roles, and configuring workflows to use the project's identity, with new assets automatically associated via gravity. Future plans include expanding projects beyond data to software and studio assets, integrating rightsizing for permissions, and adding features like cost attribution and auditing. Ultimately, Data Projects provide a scalable and stable solution for identity and access management at Netflix, aligning with how teams organize their work.
CdXz5zHNQW_K0v8hwjFH4.png
Netflix's Analytics Summit showcases how analytics informs business decisions, including content launch risk. Content goes through development, production, post-production, and launch preparation, with launch preparation relying on finalized media assets. Teams face a trade-off between waiting for the final IMF, risking delays, or starting early with a less final Locked Cut, risking rework. Manually provided production schedules for these assets often lack accuracy and coverage, especially far from delivery. This inaccuracy is strongly correlated with content launch misses. To address this, Netflix developed predictive models to estimate media asset delivery dates. These boosted tree regression models use production-level signals, metadata, and seasonal data, updated daily. The models aim to fill schedule gaps and improve existing date accuracy. Evaluating these models involves metrics like mean absolute error, bias, and error distribution. Backtests show significant improvements in predictive accuracy compared to manual schedules, reducing forecast errors. These improved predictions lead to lower Accumulated Error Days, a metric tied to launch misses. The predictive dates integrate into existing workflows, offering earlier accuracy than scheduled dates. Serving logic defaults to scheduled dates where the model underperforms, while other teams can view both and use their judgment. This initiative streamlines launch workflows and mitigates launch risks by providing more reliable delivery estimates.
CdXz5zHNQW_D56kTwX7j8.png
Netflix uses Data Bridge as a unified management plane for batch data movement. Historically, custom connectors were developed for specific needs, but efforts are underway to centralize these offerings. The Cassandra to Iceberg connector, Casspactor, was an in-house solution for critical applications like Member and Billing. Casspactor handled significant data volumes but faced challenges with fragile metadata dependencies and inherited limitations across data abstractions. These issues included skewed partition failures, lack of data model awareness, intermediate table bloat, and an inability to time travel. A new layered architecture was developed to address these shortcomings.This new engine, built on Apache Cassandra Analytics and the Move Data framework, features a core S3 reading capability and a Connector Factory model. It processes data directly into Spark DataFrames, eliminating intermediate tables. The new stack efficiently handles skewed partitions and offers autosizing capabilities for jobs. It also significantly reduces dependencies by relying solely on S3 for metadata, enhancing reliability and enabling time travel. Rigorous validation, visibility, and safety measures were crucial for migrating from Casspactor. A like-for-like migration strategy ensured minimal disruption and no changes for downstream users. Shadow testing was employed to guarantee data consistency between the old and new systems. This involved verifying that the output of the new system was an exact replica of the legacy system's output.
CdXz5zHNQW_YhOHn7KUOE.png
Daniel Kahneman's dual-process theory describes two cognitive systems: System 1 for automatic, quick thinking and System 2 for deliberate, focused effort. This concept applies to designing intelligent systems that balance immediate responsiveness with foresight. Netflix's personalized notification platform faces a similar challenge, optimizing hundreds of millions of daily messages. A core tension exists between maximizing short-term engagement and ensuring a positive long-term member experience. Over-messaging can lead to fatigue and opt-outs, while under-messaging risks missing valuable content discoveries.To address this, Netflix implemented a hierarchical framework with a "slow" policy for strategic, weekly messaging plans and a "fast" policy for tactical, real-time message selection. Previously, single-message outcome models optimized for short-term gains but overlooked cumulative effects and coupled ranking with pacing decisions. The new "slow" policy defines a personalized message pacing over a defined horizon, considering long-term engagement. This is achieved by maximizing a utility function that balances positive engagement signals against the long-term cost of messaging.A universal message cost term is introduced to prevent models from always opting for maximum frequency. The "slow" policy's decisions are stored in a feature store, enabling asynchronous communication with the "fast" policy. The "fast" policy then executes tactical send decisions within the strategic guardrails set by the "slow" policy. This decoupling allows for independent evolution of both strategies and ensures a consistent member experience. The hierarchical architecture led to significant metric lifts, particularly benefiting casual viewers by improving content awareness. Ultimately, separating frequency planning from message selection proved transformative, allowing for independent iteration on both aspects.
CdXz5zHNQW_5a5N2KsO0X.png
Data analysis is increasingly delegated to software agents, necessitating oversight for valid results, especially in Observational Causal Inference (OCI). This work introduces an agentic workflow for OCI that adheres to rigorous templates while augmenting human inspection. The workflow aims to reduce repetitive tasks for OCI practitioners, allowing them to focus on nuanced aspects like question framing and assumption evaluation. An open-sourced version of their oci-agent is available for improvement, and evaluations show it outperforms one-shot iterations and rivals hand-tuned benchmarks. The philosophy relies on target trial emulation, outlining ideal A/B tests to inform necessary assumptions for causal inference. This involves design diagnostics like covariate balance, overlap, placebo outcomes, and sensitivity analysis. The agent orchestrates an actor-critic loop with three personas: Principal (human user), Actor (analysis executor), and Critic (results synthesizer). Principals define the plan and context, Actors refine and execute the analysis with diagnostics, and Critics identify gaps and assess credibility. To empower human evaluation, the workflow makes each analytic step transparent through published artifacts like plans, specifications, and notebooks. A case study at Netflix estimated the impact of a new entertainment type, revealing significant early adopter bias. Standard regression gave a large effect, but the agentic workflow, using diagnostics, identified poor overlap and placebo test failures. Addressing these, the agent implemented trimming, significantly reducing the estimated effect to a more credible range for the overlapping population. Follow-up analyses, such as sensitivity tests and time-series generation, are facilitated by the agent's ability to manage complex, multi-version executions.
CdXz5zHNQW_diDkFz7Rdh.png
CdXz5zHNQW_FChDJm0cOO.png
Netflix's TimeSeries Abstraction ingests and queries petabytes of temporal event data with millisecond latency, using Apache Cassandra as its storage. Wide partitions, where a single partition accumulates a large volume of events over time, pose a significant challenge for TimeSeries workloads. This leads to high read latencies, timeouts, increased CPU utilization, and garbage collection pauses in Cassandra clusters. To address this, TimeSeries data is partitioned into discrete time chunks, creating manageable segments.The initial provisioning strategy relied on user-specified workload characteristics and Monte Carlo simulations to determine optimal infrastructure and partition configurations. However, this approach proved insufficient when workloads were unknown, inaccurately estimated, evolved over time, or contained data outliers. To automate adjustments, a background worker was introduced to monitor partition histograms and dynamically re-partition future time slices based on observed data density. This Time Slice Re-Partitioning strategy effectively reduces read latencies and timeouts when most data exhibits similar wide partition behavior.However, this strategy doesn't address scenarios where only a small percentage of IDs within a table are wide. For such cases, and when callers require all data even with elevated latencies, Dynamic Partitioning per ID was developed. This asynchronous pipeline detects wide partitions during read operations and transparently splits them into optimal sizes. The process involves detection, planning and splitting, and serving reads by re-routing queries to the split partitions.Detection occurs when a read operation exceeds a configured byte threshold, emitting an event to Kafka. The system initially focuses on immutable partitions for simplicity. The planning stage reads the entire partition to create a split plan, using checkpointing to handle failures. Splitting involves delegating the data division to specific strategies, like assigning more event buckets to a time bucket. Validating splits is crucial, with checksums ensuring data integrity before marking a split as complete. Finally, the TimeSeries servers use in-memory Bloom filters to efficiently divert read queries to the split partitions, making the diversion practically invisible to callers.
CdXz5zHNQW_JhVMWuRvRR.png
Netflix utilizes machine learning across various business domains like personalization, studio production, payments, and advertising. As ML adoption grew, a challenge emerged: a fragmented landscape where models and data were siloed, hindering collaboration and discovery. ML practitioners struggled to understand model lineage, feature sources, and impact across different systems. This fragmentation prevented easy answers to questions about existing features, data sources, pipeline dependencies, and the effects of changes.The core difficulty lay in connecting disparate ML infrastructure components that generated metadata. Dozens of systems, from pipeline orchestrators to experimentation platforms and feature stores, produced data in various formats. Solving this required collecting heterogeneous metadata, transforming it into a unified model, and building a connected graph for exploration.The solution is the Metadata Service (MDS), which constructs a Model Lifecycle Graph to interconnect ML entities at Netflix. MDS ingests ML metadata in real-time, enabling cross-domain queries like identifying experiments using a specific model or models sharing certain features. The vision is to make all ML assets discoverable, understandable, and reusable across the company.MDS operates on core abstractions: Components, each with a unique AIP URI; Entities, which are ML-specific assets with properties; Entity Types, defining data shapes; Domains, which group related entity types; and Providers, concrete implementations of domains from source systems. This URI-based addressing allows any service to reference any ML asset universally. The process of building the graph involves several stages.First, MDS integrates with source systems via Kafka and AWS SNS/SQS to consume thin events indicating changes. Dedicated event handlers process events from systems like the Pipeline Orchestration, Model Registry, Feature Store, Experimentation Platform, and Identity Platform. Second, MDS implements a hydration contract, validating events and calling source system APIs to fetch complete state, which is then transformed into a normalized entity. This "notification of change" pattern ensures robustness against event order issues but places read load on source systems.Third, raw events are transformed into a unified entity model with standardized fields, creating a consistent interface for downstream consumers. Normalized entities standardize field names, formats, and convert platform-specific IDs into global AIP URIs. Finally, normalized entities are persisted to Datomic for caching and relationship storage, and simultaneously indexed in Elasticsearch. Datomic, with its immutable fact model, supports complex graph traversals and entity relationships, enabling queries across multiple domains without inefficient N+1 query patterns.
CdXz5zHNQW_EXeyjNVmx8.png
The blog post discusses the technical insights into how Netflix's ML model serving infrastructure powers personalized experiences at scale across various domains. The central ML model serving platform exposes a domain-independent API abstraction and traffic routing capabilities to several domain-specific microservices for model inference. This singular API has increased the speed of innovation for iterating on newer versions of existing ML experiences and enabling new product experiences with ML. The success of the ML model serving infrastructure depends on enabling researchers to rapidly experiment with new hypotheses and safely release their models into production. The platform serves hundreds of model types and versions, netting 1 million requests per second, and operates at the level of workflows, not just individual scoring functions.The model definition contains a list of facts 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. The calling services only need to provide standard request context, and the relevant domain context, and the model can itself compute features and perform inference as part of the execution flow. The platform acts as an enabler of rapid ML innovation and limits the exposure of ML model iterations to the client apps. The key principles of the platform include model innovation independent of client apps, decoupling clients from model sharding, and flexible traffic routing rules.The platform uses a custom service called Switchboard, which serves as a flexible proxy layer for all traffic, handling over 1 million requests per second while maintaining high availability and reliability. Switchboard provides a single point of contact for all clients' model needs and can route a request based on a rich set of contextual features. The platform also introduces the concept of an "Objective", which is an enumeration defined by the serving platform that every request into the system must provide. The Objective decouples clients from concrete models and guides the platform's routing and model selection decisions.Switchboard Rules is a JavaScript configuration that allows researchers to attach model variants, experiments, and traffic splits to Objectives without changing client code. The rules dictate the default model to use for a given Objective, A/B experiments to configure for a set of Objectives, and customizations to gradually shift traffic to a new model. The rules are consumed by both Switchboard and the Model Serving clusters, and the serving platform components can take various actions based on these rules. Overall, the platform provides a scalable and flexible solution for serving ML models at Netflix, enabling rapid innovation and experimentation while minimizing the impact on client apps.
CdXz5zHNQW_XdCPf6klQA.png
CdXz5zHNQW_kK6Y54I9YV.jpeg
CdXz5zHNQW_ZIJYgW0wPc.png
CdXz5zHNQW_HceAyprWfz.png
The Netflix Live Origin is a custom-built origin server that plays a crucial role in the company's live streaming pipeline, acting as a broker between the cloud live streaming pipelines and the distribution system, Open Connect. The Live Origin is a multi-tenant microservice operating on EC2 instances within the AWS cloud, using standard HTTP protocol features to communicate with the Live Origin. The architecture of the Live Origin is influenced by key technical decisions, including resilience achieved through redundant regional live streaming pipelines and the implementation of epoch locking at the cloud encoder. The Live Origin features multi-pipeline and multi-region awareness, allowing it to select the first valid segment from each pipeline in a deterministic order. The system also detects segment defects via lightweight media inspection at the packager and provides this information as metadata when the segment is published to the Live Origin. To optimize interactions with the Origin Server, the proxy-caching functionality of nginx has been extended to address Live-specific needs, including millisecond grain caching and the ability to hold open requests for segments that are not yet available. The Live Origin also provides streaming metadata enhancement through the use of HTTP headers, which can be used to convey notifications of events within the stream to client devices. The system includes an invalidation system that can be used to flush all content associated with an event, as well as an enhanced cache invalidation system that takes into account the encoding pipeline and region used to generate each segment. The Origin storage architecture was initially based on AWS S3 but was later optimized to meet the unique latency and workload requirements of live streaming, using a KeyValue Storage Abstraction that leverages Apache Cassandra to provide chunked storage of large values.
CdXz5zHNQW_BNFU9LegnF.png
Netflix has been working to deliver the best possible entertainment experience to its members, and one key technology enabling this is AV1, a modern open video codec. AV1 powers approximately 30% of all Netflix viewing, marking a major milestone in efforts to bring more efficient and higher-quality streaming to members. Netflix co-founded the Alliance for Open Media to develop and promote next-generation open source media technologies, with AV1 being the first major project. The AV1 codec was officially released in 2018, with goals to deliver significant improvements in compression efficiency and introduce rich features that enable new use cases. Netflix first brought AV1 streaming to Android devices in 2020, which proved valuable for mobile users who are mindful of their data usage and network conditions. The success of AV1 on Android motivated Netflix to expand support to smart TVs and other large-screen devices, where most members watch their favorite shows. Today, AV1 accounts for approximately 30% of all Netflix streaming, making it the second most-used codec, and it's on track to become number one soon. AV1's superior compression efficiency has allowed Netflix to provide high-quality streaming experiences using less data, making it more accessible and reliable. The company is also exploring AV1's unique features to unlock advanced and immersive experiences for members, including high-dynamic-range and cinematic film grain. Netflix sees significant opportunities for AV1 beyond traditional video-on-demand streaming, including live streaming and cloud gaming, and is working to productize AV1 for these use cases.
CdXz5zHNQW_jHTWfYR1sl.png
CdXz5zHNQW_JBiedm3Ejv.png
CdXz5zHNQW_0cHOBDLN2F.jpeg
CdXz5zHNQW_u3pdU106U1.png
CdXz5zHNQW_VP7NReszvY.png
CdXz5zHNQW_aXb9bCvUTK.png
Recommender systems are essential components of e-commerce, streaming media, and social networks, driving significant product and business impact. At Netflix, these systems connect members with relevant content at the right time. The recommendation foundation model has made substantial progress in understanding user preferences, but there is an opportunity to further enhance its capabilities. By extending the foundation model to incorporate the prediction of underlying user intents, the model can enrich its understanding of user sessions beyond next-item prediction. Recent research has highlighted the importance of understanding user intent in online platforms, leading to more accurate and personalized recommendations. FM-Intent, a novel recommendation model, captures a user's latent session intent using short-term and long-term implicit signals as proxies, then leverages this intent prediction to improve next-item recommendations. The model establishes a hierarchical relationship between intent predictions and next-item recommendations, creating a more coherent and effective recommendation pipeline. FM-Intent makes three key contributions: a novel recommendation model, a hierarchical multi-task learning approach, and comprehensive experimental validation showing significant improvements over state-of-the-art models. FM-Intent has been successfully integrated into Netflix's recommendation ecosystem and can be leveraged for several downstream applications, including personalized UI optimization, analytics, and enhanced recommendation signals.
CdXz5zHNQW_QduYXjmsjM.png
At Netflix, a robust event processing platform was built to monitor, measure, and optimize ad campaigns. The ad serving system relies on a steady stream of ad events to adjust decisions, frequency capping, pacing, and personalization. The initial ad event handling system consisted of three main components: the Microsoft Ad Server, Netflix Ads Manager, and Ad Event Handler. The system was designed to ensure the feedback loop functioned effectively, providing insights on impressions, frequency capping, and monetization processes. As the business expanded, a new persistence layer using Key-Value abstraction was introduced to address challenges such as growth in data volume and third-party tracking URLs. The event processing pipeline was further evolved to support in-house advertising technology, incorporating features such as frequency capping, pricing information, and robust reporting system. A centralized ad event collection system was planned, providing a single unified data contract to consumers and separating concerns between upstream systems and consumers. The new pipeline supported various functions such as measurement, finance/billing, reporting, frequency capping, and maintaining an essential feedback loop back to the ad server. The development of the ads event processing systems has been a carefully orchestrated journey, showcasing teamwork, planning, and coordination across various teams. The new system has significantly accelerated the ability to launch new capabilities for the business, supporting programmatic buying capabilities, sharing opt-out signals, and ensuring accurate reporting and measurement.
CdXz5zHNQW_x4VyedRjxa.png
CdXz5zHNQW_u9iv4wSU0L.png
Netflix uses eBPF to capture TCP flow logs at scale for enhanced network insights, but accurately attributing flow IP addresses to workload identities was a significant challenge. The initial attribution approach relied on Sonar, an internal IP address tracking service, but it led to misattribution due to delays and failures in distributed systems. Misattribution rendered the flow data unreliable for decision-making, and a workaround of holding received flows for 15 minutes before attribution did not eliminate the issue. To solve this problem, Netflix developed a new attribution method that attributes local IP addresses by determining the local workload identity from its environment. For container workloads, Netflix leveraged IPMan, a container IP address assignment service, to attribute local IP addresses. Once local IP addresses are attributed, remote IP addresses can be attributed by learning the time ranges during which each workload owns a given IP address. FlowCollector maintains an in-memory hashmap to represent this knowledge and shares learned time ranges with other nodes using Kafka. The new method achieves accurate attribution and handles transient issues gracefully, and it is also cost-effective due to its simplicity and in-memory lookups. The method is extended to attribute cross-regional IP addresses by forwarding flows to nodes in the corresponding region. Finally, the method is further extended to attribute non-workload IP addresses, such as those belonging to Netflix's content delivery network.
CdXz5zHNQW_ODQpwXb03K.png
CdXz5zHNQW_VZmJPzyqeS.png