All About Content Delivery Network

·

2 min read

All About Content Delivery Network

Hey there👋🏻! Have you ever wondered why or how websites (like Hashnode) load instantly even when they are hosted several miles away - when servers are very far away from their clients who have requested for the web page. CND makes it possible.

Introduction

When a client accesses a website by typing the URL of the page from their browser, that request hits the web server and asks for the HTML page to be served on the client-side. Users are distributed across the globe and hence requests may need to travel all way long to the server😕. It is irritating if page-loading time is slower, isn't it?

Faster website means more visitors will stay and stick around longer.

Need for caching

An easy way is to cache the static contents (like HTML pages, javascript files, images, stylesheets, and videos) at different locations so that requests don't have to travel all way from the client's location to the origin servers to serve contents. Requests are redirected to the nearest cache server to get static contents and all the other requests - for dynamic data - go directly to the server, fetch the data and send it back to the client.

Data stored in caches are copies of original data. Also, these data can be removed.

So what is a CDN?

Capture.PNG

A content delivery network (CDN) refers to a geographically distributed group of servers that work together to provide fast delivery of Internet content.

CDN servers are globally distributed. So geographically these are placed closer to their users. Hence, the contents are delivered quickly (reduces latency, high availability, improves website performance, etc). This also serves the purpose when a website (like Amazon) shows stuff relevant to location-specific users(like festive sales and Ads).

Platforms that provide CDN are Akamai, Amazon CloudFront, Cloudflare, Google Cloud CDN, etc.

Thank you for reading my article😇! If you liked it please do share and leave a like below! Also, feel free to subscribe to my email newsletter.