What is a CDN?
The CDN has a significant role in the success of a business site. The majority of internet traffic travels through CDNs. From an end user’s perspective, every individual interacts with CDNs in one form or another daily. For example, a CDN may be used to deliver content to you when you:
- read articles on a news site
- shop on an e-commerce site
- watch videos on a streaming service
- use a social media app on your mobile device
However, as internet usage and the site’s popularity increase, the traffic increases, which often leads to a noticeable drop in server performance. This is because the server can’t handle so many requests from multiple clients. Due to this traditional client-server interaction model, users begin experiencing latency issues and poor user experience.
CDN emerged as a solution to all of these issues. This article will cover how CDNs work and provide use case examples to show you how this solution can work for you.
How Does a CDN Work?
To serve web content from the origin server quickly and reduce both the timeframe and travel distance between the users of a site and the corresponding web server, a CDN stores the web content of the origin server in its cache. This cache is stored in multiple locations based on the target user base of the site.
For example, if your site has a large user base in New York, London, and São Paulo, you should have a CDN presence in all these three locations. These locations are called points of presence (PoPs). Each PoP has many caching machines responsible for caching and delivering web content to its users.
If a user in or near London requests your US-hosted website, the request is handled through a CDN PoP in London for a quick turnaround time.
Example of a CDN
The following diagram illustrates how a CDN works in a hypothetical business site setup:
How CDN Caching Works
Now that we’ve covered the role of a CDN and how it works, the following paragraphs will explain how caching in a CDN works on a conceptual level.
When a user in or near London requests the site, a cache lookup occurs for the server’s content. Since this is the first time the request is coming from the client, a cache hit does not happen; this is called a cache miss. So, the request is forwarded to the origin server in the United States. The cacheable web content gets saved in the CDN cache. The response then gets served to the user.
The next time a similar request originates from a user in London, a cache hit occurs, and the request gets served from the PoP in London. The origin server will not receive the request from the client to serve the cacheable content, thus reducing the data transmission time and network traffic costs. Also, the faster response gives the user a better experience with the website.
This example used only a few CDN PoPs. CDNs can have tens or hundreds of PoPs located around the world. However, a higher PoP count isn’t a direct indicator of better CDN performance, as it doesn’t mean more total network bandwidth availability. It may indicate that many smaller, legacy PoPs with limited capacity and older technology is still online.
CDN Use Cases
There are cases where CDNs make website content stable and traffic more manageable. Some examples of use cases for CDNs are highlighted below.
On e-commerce sites where products are sold daily worldwide, the site’s coverage must reach users in multiple geographical locations with speed and agility. The CDN will reduce the user request distance between the client and the origin server and offload the server’s load, especially during significant sales events.
In the case of government sites, much public-facing static content is available for access to the general public. For densely populated countries like China and India, many government sites carry information to the public that needs to be readily accessible. The CDN has a vital role in enhancing the user experience.
Many SaaS platforms use CDNs to quickly, efficiently, and reliably handle extensive data. One such SaaS platform is Salesforce. Salesforce uses CDN to enhance its customer’s digital experience by serving the static data and files of its Salesforce platform at a faster rate.
As you can see, CDN is used by multiple organizations around the world. This section provides examples of real-world CDN applications in different companies.
Chartboost is a global ad platform that helps gaming companies make money from mobile games based on their users. This platform depends on StackPath’s global CDN infrastructure to deliver gaming ads quickly, reliably, and at appropriate intervals to over 900 million monthly users. These ads are distributed across over 300,000 mobile games installed by users across multiple geographical locations. You can find out more in this case study.
Thanks to CDN technology, the podcast S-Town saw a record-breaking 10 million downloads in just four days. The producers knew their podcast would demand many subscribers from the online community and needed a reliable CDN partner to host and stream the content in a reliable, low-latency, and continuous manner. You can learn more about how that was made possible thanks to Highwinds CDN.
- CDNs add significant value to business websites by increasing loading speeds and responsiveness
- Effective CDNs have data centers in every location where you have a user base (points of presence or edge locations)
- CDNs benefit many industries, including e-commerce, SaaS platforms, government bodies, and many apps on your phone