CDN stands for Content Delivery Network. It is a network that helps to speed up web page loading for web users. It is spread all over the world as usage of the internet is everywhere. It is basically a distributed system of servers that stores the data by the use of Amazon Web services or Google Cloud storage and it serves that data to the user via the nearest server so that the loading or buffering of web pages is low.
How CDN works
The CDN is a collection of servers or a network of all the servers that deliver data all over the world to the web user. It has three main components, each component has its own value and role to play.
- The first one is the Origin server which stores all the data spread all over the world. It is the main server that handles every delivery and also it maintains the updated version of data.
- The second one is the Edge server which stores temporary data means it stores a copy of the original data temporarily. also, It is the one that delivers the data to the web user. The number of Edge servers is many, the nearest Edge servers deliver the data to the web user so that there should not be any delay in between the loading of the page on the web.
- The third one is a DNS server that keeps track of the IP addresses. whenever a user sends a request through the internet on the web browser then in response to that request the Origin Server gives the IP address. By accessing that IP address the user gets their data on the web.
Why is CDN important
CDN's primary purpose is to reduce the latency and reduce the delay between the communication of request and response through the internet. As this world is so big and everything is working on the internet that causes a lot of traffic on the internet or website that results in reducing the speed and security.
CDN provides the fastest delivery of data across the network and protects the data from DDoS attacks. It improves the efficiency of the communication between the client and the server. It reduces bandwidth consumption, provides security, the fastest delivery of data, and improves the customer experience.
Benefits of CDN
- Fastest Delivery: It delivers the data very fast because of Edge servers that are spread all over geographical areas. It handles the web traffic which also helps in decreasing the page load time.
- Bandwidth cost: It reduces the bandwidth cost, as it provides the caching system which helps in maintaining the bandwidth consumption over the network.
- Availability: The Origin server stores all the data if any of the data gets updated the Origin server keeps track of that and updates that data immediately.
- Security: It provides all the security to the web pages. It has all the protection to prevent any security breach.
Example of CDN
This example shows the use of CDN for jQuery.
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>The jQuery CDN Example</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"
integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script type="text/javascript">
$(document).ready(function () {
$("body").append("<p>Hello geeks from GeeksForGeeks!!</p>");
});
</script>
</head>
<body>
<h1>Hello</h1>
</body>
</html>
Output:
Output
Similar Reads
What is VPN? How It Works, Types of VPN A VPN (Virtual Private Network) is a powerful tool that enhances online privacy, protects sensitive data, and enables secure access to the internet. In today's interconnected world, online privacy and data security are more important than ever. One of the best ways to protect yourself and enhance yo
8 min read
VPS vs VPN: What's the Difference â Ultimate Guide (2025) Confused between two tools that often come up in discussions related to online security and access as VPS (Virtual Private Server) and VPN (Virtual Private Network)? While they may sound similar and serve to enhance your online experience, they serve different purposes and are used for varying needs
7 min read
Top 10 Content Delivery Networks (CDNs) The promptness and reliability of content delivery over the internet are the main content delivery factors managing large traffic loads, and determining that make a website work out very well in this digital age. CDNs play an essential part in attaining fine art by distributing web content on server
8 min read
What is Content Delivery Network(CDN) in System Design These days, user experience and website speed are crucial. Content Delivery Networks (CDNs) are useful in this situation. It promotes the faster distribution of web content to users worldwide. In this article, you will understand the concept of CDNs in system design, exploring their importance, func
8 min read
Designing Content Delivery Network (CDN) | System Design In the digital age, where online content material is king, the importance of delivering a seamless and rapid user experience can not be overstated. Content Delivery Networks (CDNs) play a vital role in attaining this aim by distributing content material strategically throughout servers globally. Thi
15 min read
What is CDN Based Version ? CDN Based Version: A content delivery network is a network of servers that's geographically dispersed to enable brisk web performance by locating clones of web content closer to druggies or easing delivery of dynamic content (e.g., live videotape feeds). Each CDN server is located on what's called t
3 min read