Free preview

CDN as a Service vs. Building Your Own

Why this matters: almost every company should buy. Knowing precisely why — and what would have to be true to change that — is a genuinely senior judgment, and Netflix is the canonical worked example of the exception.

Key takeaway

Most companies avoid building their own CDNs, using providers like Akamai, Cloudflare, or Fastly, or cloud platforms such as AWS. Building only pays off at extreme, sustained scale — and even then the public CDN usually stays as backup.

The risks of depending on a public CDN

Companies contract with providers to distribute content. That introduces three specific risks:

RiskDetail
OutagesService failures are outside the content provider's control — you cannot fix them, only wait
Coverage gapsIf a provider lacks proxies in a region, you must contract additional services or deploy private infrastructure
BlockingShared domains or IPs may be blocked in certain regions because of banned content from other customers

Specialized CDNs

Some companies build specialized CDNs to control costs and performance. A specialized CDN uses points of presence (PoPs) dedicated solely to the company's content. These may function as caching servers, reverse proxies, or application delivery controllers.

Initial setup costs are high, but long-term operational costs are often lower than commercial services.

Private CDNs scale to serve petabytes and often coexist with public CDNs — the public CDN serving as backup during capacity shortages or failures.

Netflix Open Connect

Netflix's Open Connect Appliance (OCA) is a prominent example of a specialized video delivery CDN.

OCA servers do not store user data. Their primary tasks are:

  • Reporting status — health, routes, and cached content — to the Open Connect control plane in AWS.
  • Serving cached content directly to users.

The Open Connect operations team monitors all OCAs, whether at IXPs or embedded in ISP networks.

Why Netflix built it

Six reasons:

ReasonDetail
ScalabilityCommercial providers struggled to scale infrastructure fast enough to match Netflix's growth
CostRising streaming volumes made third-party services prohibitively expensive
SecurityCustom infrastructure offers better control over data security and leakage risks
ControlEnd-to-end control over the video player, network path, and servers for optimal delivery
DiagnosticsCustom HTTP modules and TCP algorithms enable faster detection and troubleshooting of network issues
RetentionCost-effective long-term retention of popular content, which is expensive with public CDNs

Netflix achieves a hit ratio close to 95% using OCA.

When building is right

ConditionWhy it matters
Your traffic is a large fraction of global internet volumeProvider pricing stops reflecting your marginal cost
Your catalogue is bounded and demand is concentratedA high hit ratio is achievable, which is what makes the economics work
You need end-to-end control of the delivery pathCustom transport and player-level optimization aren't available from a provider
Providers can't scale or reach where you needThe coverage-gap risk has already materialized
None of the aboveBuy. The setup cost and ongoing operations are not worth it

Key takeaway

Buy unless your traffic volume distorts provider economics and your content shape supports a very high hit ratio. Even then, build the base load and keep a public CDN for overflow and failure.

Interview signal by level

LevelWhat a strong answer sounds like
L4"We'd use CloudFront or Cloudflare."
L5Knows the risks: "buy it — but a provider outage is outside our control, so I'd want a second provider for critical paths."
Staff+Frames the build decision economically: "building only pays when your volume distorts provider pricing and your catalogue supports a high hit ratio — Netflix gets 95% because the library is bounded. And note they built the data plane but ran the control plane on AWS: build where your cost curve is unusual, buy where it isn't."

Next: checking the design against the requirements.

Enjoying the preview?

Create a free account to unlock the rest of this course, the in-browser judge, and live AI mock interviews.

Sign up free to continue