CDN
CDN
CDN stands for content delivery network or content distribution network is a network of
interconnected servers that speeds up webpage loading for web applications.
When a user visits a website, data from that website's server has to travel across the internet
to reach the user's computer. If the user is located far from that server, it will take a long time
to load a large file, such as a video or website image. Instead, the website content is stored
on CDN servers geographically closer to the users and reaches their computers much faster.
A CDN improves efficiency by introducing intermediary servers between the client and the
website server. These CDN servers manage some of the client-server communications. They
decrease web traffic to the web server, reduce bandwidth consumption, and improve the
user experience of your applications.
CDN can do the following tasks:
• Reduce page load time: Website traffic can decrease if your page load times are too
slow. A CDN can reduce bounce rates and increase the time users spend on your site.
• Reduce bandwidth costs: Bandwidth costs are a significant expense because every
incoming website request consumes network bandwidth. Through caching and other
optimizations, CDNs can reduce the amount of data an origin server must provide,
reducing the costs of hosting for website owners.
• Increase content availability: Too many visitors at one time or network hardware
failures can cause a website to crash. CDN services can handle more web traffic and
reduce the load on web servers. Also, if one or more CDN servers go offline, other
operational servers can replace them to ensure uninterrupted service.
• Improve website security: Distributed denial-of-service (DDoS) attacks attempt to
take down applications by sending large amounts of fake traffic to the website. CDNs
can handle such traffic spikes by distributing the load between several intermediary
servers, reducing the impact on the origin server.
Caching
Caching is the process of storing multiple copies of the same data for faster data access. In
computing, the principle of caching applies to all types of memory and storage
management. In CDN technology, the term refers to the process of storing static website
content on multiple servers in the network
Caching in CDN works as follows:
1. A geographically remote website visitor makes the first request for static web content
from your site.
2. The request reaches your web application server or origin server. The origin server
sends the response to the remote visitor. At the same time, it also sends a copy of the
response to the CDN POP (Points of Presence) geographically closest to that visitor.
3. The CDN POP server stores the copy as a cached file.
4. The next time this visitor, or any other visitor in that location, makes the same request,
the caching server, not the origin server, sends the response.
Dynamic acceleration
Dynamic acceleration is the reduction in server response time for dynamic web content
requests because of an intermediary CDN server between the web applications and the
client. Caching doesn't work well with dynamic web content because the content can
change with every user request. CDN servers have to reconnect with the origin server for
every dynamic request, but they accelerate the process by optimizing the connection
between themselves and the origin servers.
If the client sends a dynamic request directly to the web server over the internet, the request
might get lost or delayed due to network latency. Time might also be spent opening and
closing the connection for security verification. On the other hand, if the nearby CDN server
forwards the request to the origin server, they would already have an ongoing, trusted
connection established. For example, the following features could further optimize the
connection between them:
• Intelligent routing algorithms
• Geographic proximity to the origin
• The ability to process the client request, which reduces its size
What is a CDN used for?
A content delivery network (CDN) improves normal website functions and increases
customer satisfaction. The following are some examples use cases.
CDN providers
• Cloudflare
• CloudFront (by Amazon)
• Google Cloud CDN
• Microsoft Azure
• CacheFly