top of page

What is a CDN (Content Delivery Network)? How does CDN work and where is it used?

Updated: Dec 12, 2022

A majority of the content on the internet is served from physical servers which are present at a particular geographical location. And if you live very far from this server's geographical location, the content will load very slowly for you. The reason is that your request will have to travel all the way to the physical location of the server, and in the response, the content will need to travel all the way back to your machine. If the server is hundreds and thousands of km away from you, then it's possible that the website may load slower for you.

This is where CDN comes in. CDN stands for Content Delivery Network.

If you are a software developer, a system architect, or a computer science student, you would need to know about a CDN to design and develop your system such that it is efficient and optimized. If you want to know about CDN, how it works and the scenarios where using a CDN is beneficial, this blog is for you.

Let's dive right in -

  1. What is a CDN (Content Delivery Network)?

  2. How does a CDN (Content Delivery Network) work?

  3. What does a CDN infrastructure include?

  4. So how does a CDN actually work?

  5. Pros and Cons of using a CDN

  6. Benefits of using a CDN

  7. When not to use a CDN?

  8. CDN (Content Delivery Network) Topology

  9. Scattered CDN

  10. Consolidated CDN

  11. Types of CDN network

  12. Peer-to-Peer CDN

  13. Push CDN

  14. Origin Pull CDN

  15. Myths related to CDN

  16. Conclusion

What is a CDN (Content Delivery Network)?

A CDN or Content Delivery Network is a network of servers that work together to deliver content faster to end-users.

These CDN servers are distributed around the world. The content on your main server is stored on these servers and can be accessed anywhere in the world at virtually the same speed.

CDN technology's goal is to help deliver content faster by reducing the physical distance. These CDN servers will store a copy of the original content which is present on the main server. Since this stored content is like a cache, it only makes sense to store static data on these CDN servers. Hence a CDN is mostly used to store things like static websites, HTML pages, javascript files, stylesheets, images, videos, thumbnails, sprite files, etc.

CDNs are basically pseudo servers. All the incoming requests are directed to this CDN server and not the main server. This has a couple of benefits.

  • Reduces load on the main server and hence reduces the chance of the main server going down due to a lot of incoming requests

  • Reduces the response time of the requests, which leads to reduced latency

  • Reduces the bandwidth cost of the end user

The goal is for the CDN server to be as close as possible to the user’s physical location in order for them to download content as quickly as possible.

CDNs are so popular that almost every big and small businesses use CDN. CDNs are often used by websites, video hosting services, and cloud storage providers in order to reduce bandwidth costs and improve response times. Netflix and Youtube are very good examples of companies that use CDN for seamless video streaming.