System Design ( Day - 13 )

Content Delivery Network
A Content Delivery Network is a globally distributed network of servers designed to deliver web content such as HTML pages, images, videos, and scripts to users with high availability and performance. By caching content closer to end-users, CDNs reduce latency, enhance load times, and improve the overall user experience.
Let’s say we have one server deployed in india, but our users are in US, UK, Africa and in some other countries, when each time user hits a request it has to come to the sender location to server location, and then the server has to sent that data to the client, ok but wait for more users the time will be higher,
every users has to come to the india server to connect it’ll add more latency, that’s not actually good.
for this problem we can add some cacheing technique like global cache to reduce the latency,
it’ll work for some sort of issues, but its not the optimised way of doing the things
and also the global cache is the single point of failure, if that global cache goes down then the entire sever will go down, for this problem we can do distributed cache,
and also we can do like horizontal sharding of cache based on the locations or some other logic but with the sharding we reduce the latency, but still US users has to come to india and get the data,
still there is a problem.
We can do like, add the data centre in Us, UK and other countries also, so that the users from those countries will get the data from their own data centre, with this techniques the response will be faster.
Content Delivery Network takes care all of these above stuffs like distributed caching servers in different countries so on and so fourth, Hosting boxes close to the users.
Benefits of Using a CDN
Reduced Latency: Serving content from a nearby server minimizes the distance data travels, leading to faster load times.
Improved Scalability: CDNs can handle large volumes of traffic, making it easier to scale during traffic spikes.
Enhanced Reliability: With multiple servers, CDNs provide redundancy, ensuring content is available even if some servers fail.
CDN Use Cases
E-commerce: Ensuring fast load times for product images and pages, enhancing user experience and conversion rates.
Media Streaming: Delivering high-quality video and audio content to users worldwide.
Web Applications: Improving the performance and reliability of web apps by caching static assets and optimizing dynamic content delivery.
Subscribe to my newsletter
Read articles from Manoj Kumar directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
