System Design: The Content Delivery Network (CDN)
Define the critical performance and scaling problems of serving global users from a single data center. Analyze how high latency and resource strain necessitate a distributed solution. Justify the fundamental need for a content delivery network (CDN) in modern System Design.
We'll cover the following...
Problem statement
Consider a data-intensive application serving millions of global users from a single data center. This centralized architecture faces several critical challenges:
High latency: Physical distance between clients and servers increases user-perceived latency. Total latency consists of transmission delay (limited by bandwidth), propagation delay (signal travel time), queuing delay (network congestion), and processing delay. Real-time applications such as VoIP typically require end-to-end latency below 150 ms, while video streaming can tolerate higher delays but degrades with multi-second latency.
Note: According to readings from December 2021, the average round-trip latency from US East (N. Virginia) to US West (N. California) was 62.9 ms. Intercontinental latency, for example, from US East to Africa (Cape Town), was 225.63 ms.
Data-intensive workloads: Transferring large volumes of data over long distances traverses multiple ISPs and network paths. Throughput often suffers due to variable congestion and smaller
(MTU) sizes. Additionally, the origin server must transmit the same data individually to every client, resulting in redundant bandwidth usage that scales poorly with user growth.Path message transmission unit A Path MTU refers to the largest data unit that can traverse from source to destination without the need for splitting.
Note: According to a
, 78% of United States consumers use streaming services, an increase of 25% over five years. survey These statistics represent the number of shares, in the US from 2015 to 2021, of those consumers who have a subscription video-on-demand (SVOD).
Resource scarcity and failure risks: A single data center has finite compute, storage, and network capacity. As traffic increases, system resources can become bottlenecks. A centralized deployment also introduces a single point of failure. If the data center goes offline due to an outage or disaster, the service becomes unavailable.
Note: According to one study, YouTube, Netflix, and Amazon Prime collectively generated 80% of Internet traffic in 2020. Circa 2016, the CDN provider Akamai served 15% to 30% of web traffic (about 30 terabits per second). For 90% of Internet users, Akamai was just one hop away. Therefore, we have strong reasons to optimize the delivery and consumption of this data without making the Internet core a bottleneck.
The solution to these problems is a content delivery network (CDN), a system that brings data closer to users around the world.
How will we design a CDN?
We have divided the design of a CDN into six lessons:
Introduction to a CDN: Introduce CDNs and identify their functional and non-functional requirements.
Design of a CDN: Design the CDN architecture and outline the API.
In-depth investigation of CDN (Part 1): Explore caching strategies, CDN architecture, and algorithms for finding the nearest proxy server.
In-depth investigation of CDN (Part 2): Discuss content consistency, proxy server deployment, and specialized CDN configurations.
Evaluation of CDN: Evaluate the proposed design against our requirements.
Quiz on CDN System Design: Reinforce the major concepts of CDN design.
Let’s begin!