Introduction to a CDN

Define a CDN as a distributed system that uses edge servers to minimize latency and reduce origin server load. Formalize the critical functional requirements, such as content retrieval and delivery, alongside non-functional requirements, including high performance, availability, and scalability.

A content delivery network (CDN) is a distributed system of servers strategically placed across various geographic locations to improve the speed and reliability of online content delivery. Instead of relying on a single origin server, a CDN uses a network of proxy servers positioned closer to the end users.

These proxy servers operate at the network edgeThe network edge is the zone where a device or local network interfaces with the Internet. and are often referred to as edge servers. By caching content near users, edge servers reduce latency, conserve bandwidth, and protect the origin server from traffic spikes.

CDNs minimize the physical distance data travels by storing copies of both staticThis type of data doesn’t change frequently and remains on the servers for a long period. and dynamicThis type of data changes most frequently, for example, newsletters, ads, live videos, and so on. content in local data centers. This proximity significantly reduces propagation delay and ensures sufficient bandwidth is available along the delivery path.

Note: A cache and a CDN serve different purposes. A cache stores frequently accessed data closer to the application or user to reduce latency and backend load. A CDN distributes content across geographically dispersed edge servers to reduce network latency for end users.

CDNs address several key performance issues:

  • High latency: Edge servers shorten the physical distance between the content and the user, reducing network congestion and propagation delays.

  • Data-intensive loads: The origin server sends data to the CDN once. The CDN then distributes it to many users. This prevents the origin from having to send a copy to every individual user.

Note: CDN providers use various streaming protocols to deliver dynamic content, such as Real-Time Messaging Protocol (RTMP), HTTP Live Streaming (HLS), and Real-Time Streaming Protocol (RTSP).

  • Resource scarcity: CDNs handle the majority of traffic for popular content, offloading the burden from origin servers. This allows distributed CDN components to share the load.