January 26, 2023
Distributed Systems
System Design Interview
A Content Delivery Network (CDN) is a system of distributed servers (network) that deliver web content to a user based on their geographic location. The goal of a CDN is to provide faster delivery of content to users by caching content in multiple locations around the world.
The system is composed of a number of components:
- Origin Server: This is the main server which stores the original content.
- Edge Servers: These are the servers located in different geographical locations which store copies of the content.
- DNS Server: This is the server which resolves the domain name to the IP address of the edge server closest to the user.
- Load Balancer: This is the component which distributes the requests to the edge servers.
- Content Delivery Network: This is the network of edge servers which deliver the content to the user.
The system works as follows:
- The user requests a web page from the origin server.
- The DNS server resolves the domain name to the IP address of the edge server closest to the user.
- The load balancer distributes the requests to the edge servers.
- The edge servers deliver the content to the user.
The advantages of using a CDN are:
- Improved performance: By caching content in multiple locations, users can access content faster.
- Reduced bandwidth costs: By caching content in multiple locations, the origin server does not need to serve all requests.
- Increased scalability: By caching content in multiple locations, the system can handle more requests.
- Improved security: By caching content in multiple locations, the system is less vulnerable to attacks.
*** Created by ChatGPT on Jan 26, 2023.