DEV Community

Sreekar Reddy
Sreekar Reddy

Posted on • Originally published at sreekarreddy.com

🌍 CDN Explained Like You're 5

Local libraries instead of one central

Day 29 of 149

πŸ‘‰ Full deep-dive with code examples


The Library Story

Imagine there's basically one big library for your whole country.

People from Sydney, Melbourne, Perth... all end up going to that one place to borrow books.

Traffic jams everywhere! πŸš—πŸš—πŸš—

Better idea: Put small libraries in every city!


CDN = Content Delivery Network

Your website is hosted in Sydney.

Someone from Tokyo visits β†’ data travels allllll the way from Sydney. Slow!

With CDN:
CDN copies your files to servers worldwide:

  • Tokyo β†’ Tokyo server βœ…
  • London β†’ London server βœ…
  • New York β†’ New York server βœ…

Most people get files from a nearby location.


What Gets CDN'd

  • Images
  • CSS and JavaScript files
  • Videos
  • Static pages

Anything that doesn't change often.


Famous CDNs

  • Cloudflare
  • AWS CloudFront
  • Akamai
  • Fastly

In One Sentence

CDN copies your files to servers around the world so users download from a server near them, making your site faster.


πŸ”— Enjoying these? Follow for daily ELI5 explanations!

Making complex tech concepts simple, one day at a time.

Top comments (0)