...

/

Design Content Delivery Network (CDN)

Design Content Delivery Network (CDN)

Learn to design a content delivery network.

What is a CDN?

A CDN is a group of geographically distributed proxy servers. A proxy server is an intermediate server between a client and the origin server. The proxy servers are placed on the network edgeThe network edge is the zone where a device or local network interfaces with the Internet.. As the network edge is close to the end users, the placement of proxy servers helps quickly deliver the content to the end users by reducing latency and saving bandwidth. A CDN has added intelligence on top of being a simple proxy server.

Requirements

Let’s look at the functional and non-functional requirements that we expect from a CDN.

Functional requirements

The following functional requirements will be a part of our design:

  • Retrieve: Depending upon the type of CDN modelsPush or pull., a CDN should be able to retrieve content from the origin servers. We’ll cover CDN models in the coming sections.
  • Request: Content delivery from the proxy server is made upon the user’s request. CDN proxy servers should be able to respond to each user’s request in this regard.
  • Deliver: In the case of the push model, the origin servers should be able to send the content to the CDN proxy servers.
  • Search: The CDN should be able to execute a search against a user query for cached or otherwise stored content within the CDN infrastructure.
  • Update: In most cases, content comes from the origin server, but if we run script in CDN, the CDN should be able to update the content within peer CDN proxy servers in a PoPA Point of Presence (PoP) is a physical place that allows two or more networks or devices to communicate with each other. Typically, each CDN PoP has a large number of cache servers..
  • Delete: Depending upon the type of content (static or dynamic), it should be possible to delete cached entries from the CDN servers after a certain period.

Non-functional requirements

  • Performance: Minimizing latency is one of the core missions of a CDN. The proposed design should have minimum possible latency.
  • Availability: CDNs are expected to be available at all times because of their effectiveness. Availability includes protection against attacks like DDoSIn DDoS attacks, malicious agents overwhelm the origin or application server by sending a massive number of requests..
  • Scalability: An increasing number of users will request content from CDNs. Our proposed CDN design should be able to scale horizontally as the requirements increase.
  • Reliability and security: Our CDN design should ensure no single point of failure. Apart from failures, the designed CDN must reliably handle massive traffic loads. Furthermore, CDNs should provide protection to hosted content from various attacks.

Building blocks we will use

The design of a CDN utilizes the following building blocks:

Press + to interact
The building blocks used in CDN design
The building blocks used in CDN design
  • DNS is the service that maps human-friendly CDN domain names to machine-readable IP addresses. This IP address will take the users to the specified proxy server.
  • Load balancers distribute millions of requests among the operational proxy servers.

Next, we’ll discuss the design of the CDN.

CDN design

We’ll explain our CDN design in two phases. In the first phase, we’ll cover the components that comprise a CDN. By the end of this phase, we’ll understand why we need a specific component. In the second phase, we’ll explore the workflow by explaining how each component interacts with others to develop a ...

Access this course and 1400+ top-rated courses and projects.