FOUNDING PRICING · 40% OFFfor the first 1,000 members · from ₹95/month
ArchitectureNetflix11 min read

How Netflix Open Connect Delivers Video From Inside Your ISP

How a Netflix play request becomes a stream: the AWS control plane, Open Connect appliances inside ISP networks, BGP-based steering and off-peak content fill.

ShareXLinkedInWhatsApp
Bundles of yellow fibre optic cables plugged into an optical patch panel at the AMS-IX internet exchange point in Amsterdam.
Bundles of yellow fibre optic cables plugged into an optical patch panel at the AMS-IX internet exchange point in Amsterdam. Photo: Fabienne Serriere, CC BY-SA 3.0, via Wikimedia Commons.

When you press play on Netflix, two very different systems answer. A control plane running in Amazon Web Services decides whether you may watch and where the video should come from, and then a server from Netflix's own content delivery network, Open Connect, which is often sitting inside your internet provider's building, sends the actual bytes. Understanding that split, and how a client is steered to the right server, covers most of what an interviewer means by "design a video streaming service".

Diagram of a Netflix play request: the client asks the AWS control plane, which ranks Open Connect appliances using their reported health, BGP routes and stored files, and the client then streams video from an appliance inside its ISP.

The problem and the scale

Video is heavy. A web page is a few megabytes fetched once; a film is gigabytes delivered steadily for two hours, to millions of homes at the same time in the evening. If every one of those streams travelled from a handful of cloud regions, the long-distance links of the internet and the links between Netflix and each ISP would have to carry all of it at peak.

A living room with a flat-screen television on a low cabinet, wooden armchairs and a Brazilian flag on the wall.
Where every stream ends: a living room television, here in a house in Recife, Brazil. Illustrative; the screen is off. Photo: Wilfredor, CC BY-SA 4.0, via Wikimedia Commons.

Netflix says it started Open Connect in 2011 for two reasons: its traffic had become a significant share of what consumer ISPs carried, so it needed to work with them directly, and a delivery network built for one catalogue could place content in advance far more efficiently than a general CDN that reacts to demand.

The published figures show how it grew, and each belongs to its year:

YearWhat Netflix published
2011Open Connect programme begins
March 2016Appliances in close to 1,000 locations; Open Connect carries all Netflix video traffic; close to 90% of traffic goes over direct connections to residential ISPs
2021More than 14,000 appliances across 142 countries; over US$1 billion spent on the programme since launch; appliances at more than 80 exchange point locations
December 202218,000 servers in 6,000 locations across 175 countries

The 2016 post also draws the line that the rest of this article follows: everything before you press play (the interface, recommendations, transcoding) runs in AWS, and everything after it is served by Open Connect.

Two planes: AWS decides, Open Connect delivers

The building block is the Open Connect Appliance, or OCA. It is a purpose-built cache server that stores encoded video and image files and serves them over HTTP or HTTPS. Netflix's appliance page lists the software as FreeBSD with the NGINX web server, plus the BIRD routing daemon to learn routes over BGP. The current page describes a storage appliance with up to 120 TB of raw capacity and roughly 200 Gbps of throughput, and a smaller "global" appliance with up to 60 TB.

An OCA is deliberately simple. According to the Open Connect overview, it does only two things: it reports its status to the control plane in AWS, and it serves files when a client asks. It holds no viewing history, no DRM information and no member data.

OCAs are deployed in two ways:

  1. At internet exchange points (IXPs). Netflix installs and pays for appliances in exchange points in its major markets, and connects them to the ISPs present there through settlement-free peering, meaning neither side charges the other.
  2. Embedded inside ISP networks. Netflix gives appliances free of charge to qualifying ISPs. Netflix supplies the hardware; the ISP supplies space, power and connectivity, and controls which of its customers are sent to those appliances.
Open equipment cabinets with yellow fibre optic patch cables running between optical panels in a data centre cage.
Fibre patching in the AMS-IX core cage in Amsterdam, the kind of exchange point where networks interconnect. Illustrative; it does not show Netflix equipment. Photo (cropped): Fabienne Serriere, CC BY-SA 3.0, via Wikimedia Commons.

What happens when you press play

The overview document describes the playback path in five steps:

  1. OCAs periodically report their health, the routes they have learned and the files they hold to a cache control service in AWS.
  2. The client device asks the Netflix application in AWS to play a title.
  3. Playback services in AWS check that the user is authorised and the title is licensed, then work out which specific files this device needs, taking the device and current network conditions into account.
  4. A steering service uses the stored OCA reports to choose appliances that should serve those files and generates URLs pointing at them.
  5. The playback services return those URLs to the client, which then requests the video directly from the OCA.

Two details matter here. First, steering happens by handing the client explicit URLs, not by leaving the choice to DNS or to anycast routing. The control plane knows which files each appliance holds, so it can avoid sending a client to a server that would miss. Second, the deployment guide says the client receives a ranked list of appliances, typically three or more, so the player has alternatives if its first choice becomes slow or unavailable.

Steering: how the control plane ranks appliances

How does a service in AWS know which appliance is "close" to a viewer in Visakhapatnam? It borrows the answer from the ISP's own routing.

Each embedded OCA runs a BGP session with a router in the ISP's network. The ISP advertises to the appliance the IP prefixes of the customers it wants that appliance to serve. The OCA does not use these routes to forward packets; it passes them up to the control plane, which now knows that this appliance is meant to serve those address ranges.

Netflix's partner documentation describes the ranking as a modified form of BGP best path selection. Assuming an appliance has the title and spare capacity, the criteria are applied in order, moving to the next only on a tie:

  1. The appliance that received the most specific route to the client's prefix.
  2. The appliance that received the route with the shortest AS path.
  3. The appliance that received the route with the lowest multi-exit discriminator (MED).
  4. The geographically closest appliance, using geolocation of the client's IP address.

If appliances tie on everything, traffic is balanced between them.

The second criterion explains why an embedded appliance normally beats one at an exchange point. A prefix heard directly by an embedded OCA has an AS path of length 1 (just the ISP). The same prefix heard at a peering location has length 2, because it passes through Netflix's peering AS, 2906, first. The documentation also says Netflix adds 0 to the MED for an embedded OCA, 50 for a private peering link and 100 for public peering at an exchange, which biases ties the same way. When both exist, peering is used mainly for backup, for fill and for long-tail titles that the embedded appliance does not hold.

Diagram comparing two appliances that learn the same customer prefix: an embedded OCA sees an AS path of length 1 and adds 0 to the MED, an exchange point OCA sees length 2 through AS 2906 and adds 50 or 100, so the steering service ranks the embedded one first at the shortest AS path rule.
Why the embedded appliance outranks the one at the exchange point

The useful design idea is that the ISP steers using a tool it already operates. To move a neighbourhood from one appliance to another, a network engineer changes a BGP advertisement, not a Netflix setting.

Fill: moving the catalogue while everyone sleeps

A typical CDN is a pull cache: the first request for an object misses, the edge fetches it from the origin, and later requests hit. That works badly for video, because the first viewers of a new release arrive at peak time, exactly when the network has least spare capacity.

Open Connect pre-positions content instead. Netflix knows its whole catalogue and, in the overview's words, can predict with high accuracy what members will watch and when. So the control plane decides which files each appliance should hold, and appliances download them during an off-peak fill window.

The partner documentation gives the mechanics:

  • The window is 12 hours, by default 2 am to 2 pm local time, agreed with the ISP so that it falls in the trough of Netflix traffic.
  • A storage appliance fills at no more than 1.2 Gbps and may take in up to 6.5 TB in a window.
  • Each appliance usually holds only part of the regional catalogue. Changes in popularity, new titles and re-encoded files are what the nightly fill delivers.
  • Appliances prefer to copy from each other. An OCA in the same cluster or subnet is tried first (peer fill), then other OCAs it can see in its BGP feed (tier fill), before a regular fill from further away. In a cluster, one appliance fetches a new file and its neighbours copy it locally.
  • Urgent cases, such as a day-of-broadcast title or a repaired encode of a popular one, are filled out of cycle.
Diagram of a 24 hour timeline with the default fill window from 2 am to 2 pm and serving through the evening peak, followed by the order of fill sources: peer fill from the same cluster or subnet, then tier fill from appliances in the BGP feed, then regular fill from further away.
The fill window and where an appliance copies new files from

Netflix's 2016 post describes the wider picture: a file is copied once from the transcoding repository to storage on each continent during off-peak hours and replicated from there to the appliances in each ISP, which keeps bulk transfers off expensive links such as undersea cables.

Because ISPs build capacity for the evening peak, bytes moved at 4 am use capacity that would otherwise sit idle.

Adaptive bitrate and the trade-offs

Each title is encoded many times, for different devices, resolutions and bitrates. The 2021 briefing paper explains that video is served in chunks that fill a buffer on the device, and that the versions adapt automatically to the device and the available bandwidth. If the connection weakens, the player requests the next chunk from a lower-bitrate version; when it recovers, quality steps back up. Every one of those versions is a separate file an OCA may need to store, which is one reason the control plane, not the appliance, decides what goes where.

The design has costs that Netflix accepted:

  • It only works for a predictable catalogue. The briefing paper says pre-positioning is possible because the catalogue is defined and limited. A user-upload platform or a live event cannot be filled the night before.
  • It needs hardware and partnerships. Netflix buys the appliances, gives them away and supports them. It reported spending over US$1 billion by 2021.
  • Starting playback depends on the control plane. Appliances serve bytes, but by design every session begins with a request to AWS for authorisation and URLs.
  • Not everything is local. Since an embedded appliance holds only part of the catalogue, rarely watched titles come from a peering site further away.

The computer science underneath

Content delivery networks. A CDN reduces latency and backbone load by keeping copies of content near users. Open Connect is the extreme case: the copy sits inside the access network itself. Our lesson on CDNs and the edge covers the general model, and the video streaming design lesson walks through renditions, segments and adaptive bitrate.

Push versus pull caching. Ordinary HTTP caches fill on demand and use freshness rules to decide when to revalidate, as explained in HTTP caching and conditional requests. Open Connect is a directed cache: a central planner chooses the contents ahead of time. Encoded video files do not change once written, so the hard problem is placement, not invalidation.

BGP as a source of topology. BGP is how autonomous systems tell each other which prefixes they can reach. Netflix reuses its attributes, AS path length and MED, as inputs to an application-level decision. The first criterion is the same rule every router applies when forwarding: the most specific route wins, which is longest prefix match.

Control plane and data plane separation. The part that makes decisions is small, stateful and centralised; the part that moves bytes is large, simple and spread across thousands of sites. Each can then be scaled and hardened in the way that suits it.

What an interviewer could ask from this

Why does Netflix run its own CDN instead of serving video from the cloud? Volume and locality. Serving from a few regions would push all peak traffic across long-haul and interconnect links. Appliances inside ISPs keep the bytes local, and a single-purpose CDN can pre-position a known catalogue.

How is a client directed to a particular server? The control plane returns a ranked list of URLs for specific appliances. It ranks them with the routes each appliance learned over BGP (most specific prefix, shortest AS path, lowest MED), then geography, after checking the appliance has the file and is healthy.

Why steer with URLs and not DNS or anycast? The steering service knows per-file availability, health and capacity for each appliance, and it sees the client's real address. Explicit URLs let it use all of that and hand the client fallbacks.

What is the difference between a pull CDN and Open Connect's fill? A pull CDN fetches an object on the first miss and caches it. Open Connect decides in advance which files each appliance needs and downloads them in an off-peak window, so popular content is already there at peak.

What happens if the appliance inside an ISP fails? The appliance stops reporting healthy, so the steering service ranks other appliances first, such as another embedded site or an exchange point reached over peering. Clients already hold alternative URLs.

Takeaways

  • Netflix splits streaming into a control plane in AWS, which authorises and steers, and a data plane of Open Connect appliances, which only stores and serves files.
  • Appliances sit at exchange points and inside ISP networks; as of December 2022 Netflix reported 18,000 servers in 6,000 locations.
  • Steering reuses BGP: ISPs advertise customer prefixes to appliances, and the control plane ranks appliances by prefix specificity, AS path, MED and distance.
  • Content is pushed to appliances in an off-peak fill window, so peak-hour viewing is served from local disks.
  • The approach depends on a finite, predictable catalogue and close cooperation with ISPs.

Sources

  1. Netflix: Open Connect Overview (PDF)
  2. Netflix: Open Connect website
  3. Netflix: Open Connect Appliances
  4. Netflix: Open Connect deployment guide, including Network configuration and Fill patterns (PDF)
  5. Netflix: A cooperative approach to content delivery, briefing paper, 2021 (PDF)
  6. Netflix: How Netflix Works With ISPs Around the Globe to Deliver a Great Viewing Experience (2016)
  7. Netflix: Open Connect, celebrating a decade of smooth and efficient streaming (2022)
  8. APNIC Blog: Netflix content distribution through Open Connect (2018)

Written by the Codevizag Academy team

An independent explainer built from the public sources listed above. Codevizag Academy is not affiliated with Netflix. Found a mistake? Write to support@codevizag.com.

More case studies

Understood it? Now prove it.

The lessons behind this case study are free, and 20 problems a month are judged on real test cases at no cost.

Start solving free