How Netflix Scales to 260 Million Subscribers

A deep dive into Netflix's architecture — how they handle massive scale with microservices, adaptive streaming, a custom CDN, chaos engineering, and data-driven personalization.

netflixscalingmicroservicescdncase-studyarchitecture

How Netflix Scales

Netflix is one of the most technically impressive companies in the world. They stream video to over 260 million subscribers in 190 countries, handling more than 17% of all downstream internet traffic in the United States during peak hours. Here's how they do it.

The Two Planes

Netflix's architecture is split into two distinct planes:

Control Plane (AWS): Everything that isn't video bytes — user authentication, profiles, billing, recommendations, search, the browse UI, API serving. This runs on AWS across three regions (US-East, US-West, EU-West) in an active-active configuration.

Data Plane (Open Connect): The actual video bytes. Netflix operates its own CDN called Open Connect with thousands of custom-built servers (Open Connect Appliances, or OCAs) deployed inside ISP networks worldwide.

This separation is brilliant because the two planes have completely different scaling characteristics. The control plane handles billions of API requests but the data is small (JSON). The data plane handles fewer requests but each one involves streaming gigabytes of video.

Open Connect: Netflix's Secret Weapon

Open Connect is arguably Netflix's most important technical achievement. Here's how it works:

  1. Content Preparation: When a new movie or show is ready, Netflix transcodes it into hundreds of different files — different resolutions (360p to 4K), different codecs (H.264, VP9, AV1), different audio tracks (Dolby Atmos, stereo, multiple languages). A single movie might produce 1,200+ files.

  2. Content Placement: Netflix's content placement algorithm determines which files to store on which OCA servers. Popular content is replicated broadly. Niche content is stored in fewer locations. The algorithm considers geographic viewing patterns, time zones, and predicted demand.

  3. Off-Peak Fill: During off-peak hours (typically 2-6 AM local time), OCAs download new content from Netflix's origin servers in AWS. This is called "fill." By the time peak viewing starts in the evening, all content is pre-positioned.

  4. Client Steering: When a user presses play, Netflix's control plane runs a steering algorithm to select the best OCA for that user based on: network proximity (prefer OCA inside the user's ISP), server load, content availability, and historical streaming quality from that OCA.

Microservices at Netflix Scale

Netflix runs over 1,000 microservices. Key patterns they use:

Circuit Breaker (Hystrix)

When a downstream service starts failing, the circuit breaker opens and returns a fallback response instead of cascading the failure. For example, if the recommendation service is down, the UI shows a generic "Popular on Netflix" row instead of personalized recommendations.

Bulkhead Pattern

Each service has isolated thread pools for its downstream dependencies. If calls to Service A are slow, it only exhausts Service A's thread pool — not the entire application's thread pool. Other downstream services continue operating normally.

Eventual Consistency

Netflix embraces eventual consistency throughout its architecture. When you update your profile, the change propagates across regions within seconds. During that window, you might see the old profile in a different region. For Netflix's use case, this trade-off is acceptable.

Personalization at Scale

Netflix's recommendation engine influences 80% of content watched. The system uses:

  • Collaborative Filtering: Users who watched X also watched Y
  • Content-Based Filtering: Analyzing metadata, cast, genre, tone, pacing
  • Contextual Signals: Time of day, device type, viewing history, region
  • A/B Testing: Netflix runs hundreds of A/B tests simultaneously to optimize every aspect of the experience, including artwork selection (different users see different thumbnail images for the same show)

The recommendation system processes billions of events daily, using Apache Kafka for real-time event streaming and Apache Spark for batch processing.

Lessons for System Design Interviews

  1. Separate control plane from data plane when they have different scaling characteristics
  2. Build for failure — assume every component will fail and design graceful degradation
  3. Use CDNs aggressively — for Netflix, building their own CDN was worth the investment at scale
  4. Embrace eventual consistency when strong consistency isn't required
  5. Measure everything — Netflix makes decisions based on data from millions of A/B tests and real-time metrics

GO DEEPER

Learn from senior engineers in our 12-week cohort

Our Advanced System Design cohort covers this and 11 other deep-dive topics with live sessions, assignments, and expert feedback.

FREE_COURSES
preview