A CDN stands for Content Delivery Network.
It’s a series of servers distributed all around the globe, all linked together.
CDNs are the ultimate cache, and the cheapest way to serve content all around the world.
Visitors will never access the actual web server that hosts your files, but instead they will hit those CDN servers, helping to reduce the load.
A CDN provides
- Speed, being closer to a user’s network improves speed and reduces latency
- Redundancy, if a node of the CDN fails, other nodes can handle the traffic
- Reduced costs in bandwidth and server power compared to serving all the traffic from a centralized location that might not be optimized for serving lots of traffic
- Security by adding additional levels of protection at the CDN node level. Not all CDNs do this, but most do and also introduce DDoS attack protection mitigations
A CDN gets the original resource from an origin server, and as long as the origin does not change, it will continue serving its local copy of an asset:
Each CDN server is located in different continents, and depending on how the CDN is built, in different parts of a continent as well.
CDNs might be integrated directly by your web hosting as well. I use Netlify for example, and they integrate an automatic CDN, which makes my site fast in every location of the world.
More network tutorials:
- Introduction to WebSockets
- How HTTP requests work
- The HTTP Request Headers List
- The HTTP Response Headers List
- HTTP vs HTTPS
- What is an RFC?
- The HTTP protocol
- The HTTPS protocol
- The curl guide to HTTP requests
- Caching in HTTP
- The HTTP Status Codes List
- What is a CDN?
- The HTTP/2 protocol
- What is a port
- DNS, Domain Name System
- The TCP Protocol
- The UDP Protocol
- An introduction to REST APIs
- How to install a local SSL certificate in macOS
- How to generate a local SSL certificate
- How to configure Nginx for HTTPS
- A simple nginx reverse proxy for serving multiple Node.js apps from subfolders
- What is a reverse proxy?