Bird
Raised Fist0
HLDsystem_design~12 mins

Content delivery with CDN in HLD - Architecture Diagram

Choose your learning style9 modes available
System Overview - Content delivery with CDN

This system delivers web content like images, videos, and web pages to users quickly and reliably. It uses a Content Delivery Network (CDN) to cache content closer to users worldwide, reducing load times and server strain.

Architecture Diagram
User
  |
  v
+----------------+
|    CDN Edge    |
+----------------+
  |
  v
+----------------+       +----------------+
| Load Balancer  |<----->|   Origin Server |
+----------------+       +----------------+
                             |
                             v
                      +----------------+
                      |   Database     |
                      +----------------+
Components
User
client
Requests content such as web pages, images, or videos
CDN Edge
cdn
Caches and delivers content close to users to reduce latency
Load Balancer
load_balancer
Distributes incoming requests evenly to origin servers
Origin Server
service
Hosts original content and serves requests not found in CDN cache
Database
database
Stores dynamic content and metadata required by origin server
Request Flow - 10 Hops
UserCDN Edge
CDN EdgeCDN Edge
CDN EdgeUser
CDN EdgeLoad Balancer
Load BalancerOrigin Server
Origin ServerDatabase
DatabaseOrigin Server
Origin ServerLoad Balancer
Load BalancerCDN Edge
CDN EdgeUser
Failure Scenario
Component Fails:CDN Edge
Impact:Users experience slower content delivery as requests bypass CDN cache and go directly to origin servers, increasing latency and load on origin.
Mitigation:System falls back to origin servers via load balancer; origin servers must be scalable to handle increased load. CDN provider redundancy and multiple edge locations reduce risk.
Architecture Quiz - 3 Questions
Test your understanding
What is the main purpose of the CDN Edge in this system?
ATo cache and deliver content close to users
BTo store user data permanently
CTo balance load between origin servers
DTo process database queries
Design Principle
This system uses a CDN to cache content near users, reducing latency and origin server load. The load balancer ensures origin servers share traffic evenly, improving reliability and scalability.