Content Delivery Network (CDN)
What is a Content Delivery Network?
A content delivery network, abbreviated as CDN, is a group of servers that are geographically distributed to deliver internet content quickly. CDNs were created to address growing international demand for web content. Instead of relying on one server to transmit content to users across the globe, businesses set up servers in different geographies so that when an online user makes a request to the CDN, such as downloading a file, the network routes the request to the server closest to the user’s location. The upside? Improved latency means the file downloads faster.
For businesses with content-heavy sites or international audiences, CDN’s are an essential part of creating a website. Currently 47% of the top 1 million websites in the world use a CDN—from online news publications, social media sites, gaming companies, to eCommerce businesses—to improve their content delivery to their site users.
How Does a CDN Work?
While the concept of CDNs may seem straightforward, they contain two vital components that are hidden to users and most businesses: edge servers and POPs.
Edge Servers
To optimize website speed, CDNs use multiple servers in various geographic locations. Edge servers disseminate information from the origin server—where the most up-to-date content is stored—to the different server locations.
Point of Presence (POP)
Each different server location is known as a point of presence, or POP, and together these POPs make up a CDN. The more strategically-located POPs in a CDN, the quicker users around the world can access the website content. Each POP stores a cached version of the website’s content: videos, social media posts, photos, documents, etc. When a user makes a site request, like downloading a file, the CDN reads the user’s IP address, determines the nearest POP, which then retrieves the cached version of the website for the user.
So, what does it look like when these components work together? Let’s say you’re in Australia and want to read an article from a US-based news site that operates on a CDN. If it’s not yet cached, then the content is considered new and the edge server retrieves the new webpage from the origin server, and caches on the Australian POP. Then, for all subsequent Australian-based readers, the region’s POP would instantly retrieve the cached article page and avoid the information traveling back and forth across the world again.
Rather than creating unique CDNs, which would be expensive and time-consuming, most businesses gain access to a network of servers through a CDN provider, which either host content on their POPs or those of a third-party network operator.
This is quite a complex process to understand, so we've also laid it out in the following steps:
When a user requests a web page the request is typically sent to the origin server where the website is hosted.
The CDN provider maintains a network of servers located in data centers across different geographic regions. These servers are referred to as edge servers or points of presence (PoPs).
The first time a user requests a particular piece of content, the CDN retrieves it from the origin server and caches (stores) a copy of that content on one or multiple edge servers. The cached content is then served directly from the edge server for subsequent requests, reducing the need to retrieve it from the origin server again.
When subsequent requests for the same content are made, the CDN uses intelligent routing algorithms to direct the user's request to the nearest edge server or the one that can deliver the content most efficiently. This helps reduce latency by minimizing the distance the content has to travel.
The edge server responsible for serving the requested content delivers it directly to the user's device. This minimizes network congestion and improves the overall user experience.
CDNs also handle cache invalidation, which ensures that when the content on the origin server changes, the cached copies on the edge servers are updated or removed. This can be done through various methods, such as time-based expiration, cache tags, or purging specific content.
When it comes to building a Wix website, you can rest assured your site's performance and reliability is bolstered by its network of CDN's. This leaves you free to focus on creating and maintaining your site, whether it's an online eCommerce website or a free portfolio website.
You may also be interested in:
Benefits of Using a CDN
Giving users quicker access to your content is definitely a main benefit of using a CDN, but it’s not the only one. Here are other ways CDNs benefit businesses and anyone building a website from scratch:
Improved Performance
By minimizing the distance content travels, a CDN improves a page’s loading time by seconds—or even milliseconds. While this amount of time might not seem to make a huge difference, providing a high-quality website that meets—or even surpasses—a user’s latency expectations can cause a customer to convert rather than bounce.
Reduced Bandwidth Cost
Whenever an origin server responds to a user’s request, it uses a business’s bandwidth, or how much data their visitors can view at a certain time. When a business stores cached copies of content on a CDN, it reduces the need to access the origin server, thus reducing the bandwidth usage.
Reliability
Let’s say a company plans to release a highly-anticipated new product on their website at 12:00 am EST on a Friday. If the company only had one server, the millions of users accessing the website at the same time would likely delay content delivery or even crash their origin server. However, a CDN would significantly reduce the load on the origin server, since users could easily access content cached on POPs around the world.
Increased Security
Storing content on multiple servers also mitigates your risk of denial of service (DDoS) attacks. This common cyber attack occurs when exploiters overwhelm a server to take down a website. By spreading the load across different servers, CDNs help avoid a website going down completely during a DDoS attack. CDNs also secure websites in other ways, such through up-to-date TSL/SSL certificates, which authenticate a website by encrypting traffic and confirming server identity.
Web Hosting vs CDNs
Content delivery networks are not interchangeable with web hosting. Web hosting is when an entire website is stored and accessed by users via one specific server. That means if a user wants to access a web-hosted site on a server on the other side of the world, there will be longer load times.
A CDN instead uses a whole network of servers around the world to simplify content delivery to a user, but shows a cached version of the webpage—not all of it, all at once. When hosting a website, the web host usually has a single server, too, meaning it’s more vulnerable to DDoS attacks than those that use CDNs.