Own the edge: Netflix
Netflix built its own CDN and put a memcached tier in front of the database, so video and personalized reads never touch the origin.
Netflix started Open Connect in 2011, after the growth of streaming made a standard CDN too expensive. Open Connect is Netflix's own network of cache appliances, placed inside internet exchange points and, for qualifying ISPs, inside the ISP's own data center. Netflix said in 2016 that it carried 100% of its video traffic, about 125 million hours a day, from close to 1,000 locations.
The system#
The control plane runs on AWS: signup, browsing, playback, and the personalized data behind them. EVCache, a memcached tier, holds that data. Each write goes to every zone in the region, and a Kafka pipeline replicates it across regions, so any region can serve any member. The video itself never touches AWS. The player asks Open Connect for the bits.
The board#
Drag to pan. Hold Ctrl or Cmd and scroll to zoom.
| Where | Setting | Value | Why |
|---|---|---|---|
| CDN | TTL (seconds) | 3600 | An edge copy lives for an hour, as a video object does on an Open Connect appliance. |
| CDN | Purge on deploy | On | A new release clears the edge, so no viewer gets the old file. |
| CDN | Cache key | query | Video is not personalized, so the path and query are enough. The personalized pages stay on the app tier. |
| App Server | Instance size | large | Large, because the control plane serves the personalized pages. |
| App Server | Copies | 4 | Four copies stand for the stateless app servers behind the edge. |
| Cache | Engine | memcached | EVCache runs on memcached, and memcached is the game engine that scales with cores. |
| Cache | Cache strategy | aside | The app fills the cache on a miss, the read path EVCache serves. |
| Cache | TTL (seconds) | 60 | A minute bounds how stale a personalized answer can be. |
| Cache | Instance size | large | Large, because the cache holds each member’s personalized state. |
| Database | Instance size | medium | Medium, because most reads stop at the cache or the edge. |
| Object Storage | Storage class | standard | The origin keeps the video objects that the edge has not cached. |
| Object Storage | Lifecycle (days) | 30 | Older titles move to a cheaper class after a month. |
Research this Design needs: Content delivery, Caching, Object storage, Content delivery, Caching, Object storage, Tiered caching.
The CDN is Open Connect: a cache close to the viewer that answers media without the origin. The App Servers are the control plane, the Cache is EVCache, the Database is the source of truth, and Object Storage holds the video objects the edge has not cached.
Why it works#
Two caches answer two different questions. The edge answers the same bytes to millions of viewers, so a copy near them removes almost all of the long-haul traffic. EVCache answers a personalized read from memory, so the database sees fewer queries. CDN push and pull and tiered caching cover the two layers.
Where the game stops#
The game's CDN is a managed Component, not a fleet of Netflix appliances inside ISPs. The board does not show EVCache's cross-region Kafka replication or its per-zone writes. The caption is Quorum's result, not Netflix's traffic. The shape is the part that carries: an edge for the bytes, a memory tier for the personal data.
Sources#
Open Connect Overview, Netflix: what Open Connect is, how the appliances are placed, and what the control plane does.
Caching for a Global Netflix, Netflix Technology Blog: EVCache, its per-zone writes, and the Kafka replication path.
How Netflix works with ISPs around the globe, About Netflix: the 2016 figures for video share and the number of locations.