What is a CDN?
A content delivery network (CDN) is a globally distributed network of caching (edge) servers that are deployed to efficiently deliver content to users worldwide.
By having servers that cache content close to the location(s) of end users, CDNs minimize latency, speeding up load times for websites, applications, and downloads. This accelerated delivery also brings specific benefits for businesses: a better user experience, boosted customer loyalty and brand trust, and improved SEO for websites.
Moreover, a properly configured CDN mitigates DDoS attacksâby distributing the load across servers worldwide, this disperses a spike in fake traffic designed to flood a website with requests.
What challenges do CDNs address?
At a fundamental level, two significant challenges that CDNs help solve are easy to grasp no matter what your comfort level is when it comes to tech:
- Website or application performance. The objective here is to reduce latency as much as possible. Reducing the distance between where your website is hosted and where your websiteâs visitors connect to your content could bring significant value to your user experience and audience loyalty.
- Website or application availability. We all want our websites to be as resilient as possible when experiencing surgesâresponses to an anticipated sales event or a much-hyped patch to a game being released, for example, or when combating DDoS attacks. Distributed servers make our website or app content simultaneously more available to users and less vulnerable to malicious actors and/or spikes in requests.
Letâs dig a little deeper into the details.
Website performance
Regarding website or app performance, several factors come into play: DNS and host server settings, code quality and optimization, and so on. But one aspect that is immutable is the distance between your web (origin) server and the location of your users. No matter how well you optimize configuration at the web server cityâletâs say itâs hosted in Berlinâthe physical distance involved in getting content to users in Barcelona is different than transmitting it to your website visitors in Boston.
Enter the power of a content delivery network. A CDN helps meet the need to reduce the transfer time for all website content: static assets (.css, .html, .jpg, and other types of files), and dynamic assets (data generated dynamically based on user behavior and interaction, or API calls, for example).
By caching static content (and processing dynamic content) closer to the user, you are literally and figuratively positioning yourself to significantly improve the performance of your website or app.
Website availability
With respect to the availability of a website or application, we can start with how CDNs protect against DDoS attacks, and the considerable value that brings to business ownersâespecially those operating in global markets:
- DDoS attacks are the simplest, most popular type of cyberattacks, and their frequency is only increasing with each passing year.
- It is both expensive and difficult to maintain on-premise anti-DDoS solutions.
- With servers distributed across continents, a CDN provides you with extensive bandwidth, helping secure your web server from DDoS attacks. Many CDNs also employ additional filtering and security mechanisms that enhance and improve anti-DDoS strategies.
A CDN also protects your web server (origin server) from being overloaded. There are both limited compute resources and limited bandwidth with the origin server, and if more client requests come in than the web server can handle, your website or application may be rendered unavailable.
With caching (edge) servers processing user requests, bandwidth consumption is reduced at the origin server, saving you network resources.
Additional challenges that CDNs help solve
Traffic encryption: Privacy is paramount, and securely encrypting the transmission of data is essential. Using SSL/TLS encryption assists with security and upholds the integrity of communications. A CDN can encrypt traffic when it passes through edge servers, which is all the more important should your website not have an SSL certificate of its own.
Application security: CDNs can be outfitted with a WAF (web application firewall). This tool is specifically geared to safeguard applications from vulnerabilities, a proactive filter designed to block attacks and common exploits.
Access orchestration: The use of a CDN facilitates another layer of controlâyou can decide when to grant or deny access to the content of a website or application.
Load balancing: If you are using multiple origin servers, a CDN can operate as a load balancing tool, efficiently distributing incoming requests. This is an effective way to handle traffic congestion and keep content reliably online, all while optimizing server capacity.
How does a CDN work?
![How content is delivered to the user with CDN and without CDN](https://assets.gcore.pro/blog/what-is-a-cdn/1.jpg)
CDNs work by harnessing servers that are distributed globally with cached content. When a user requests static content for the first time, the content delivery network retrieves these assets from the origin server (where your website is hosted). The CDN will then place a copy of these assets, caching them within the nearest edge server to the user making the request.
Now that data is cached at an edge of the network, the distance for communication to travel has been reducedâthis makes your website content more readily available to be accessed by your visitorsâ future requests. The CDN has allowed the origin server to avoid processing the same static requests, and latency has been reduced.
Lastly, by caching data and spreading multiple requests for the same content across a distributed networkâinstead of relying on the origin (host) serverâthe traffic load becomes much more balanced, and delivery becomes more uniform and efficient.
As a business owner, here is the takeaway to keep in mind: With a CDN deployed, end users can access your websiteâs content from any server in the network. Ideally, this access will occur at the server closest to the end user; however, should that server go offline, communications will be rerouted through another server to keep your websiteâs pages reliably available. With this infrastructure in place, one of the most crucial needs for any business-oriented websiteâuptimeâremains uninterrupted.
What are the components of a CDN?
So far, weâve covered the fundamental purpose of a CDN and the challenges it aims to solveâreducing latency, ensuring website and application availability and responsiveness, and improving website security. And weâve described how caching content across a network of globally-distributed servers is the network âin action,â doing the work it is designed to do.
Now, letâs break down the design of a content delivery network, their individual components and the role each plays in the larger concept of a CDN.
There are three entities here: the origin server (you, as the customer with the hosted website); the caching servers (components that make caching and faster distribution of content possible); and the end users, those visitors accessing your website or application via their device and expecting it to be a smooth experience.
Before we proceed, itâs important to keep in mind that without a CDN two of these entities remain the same: the origin server and the end user. The concept of a CDN is to enhance the functionality of the former while providing an optimal experience for the latter.
Letâs now define the following: the origin server, caching servers, and points of presence.
What is an origin server?
An origin server, like the name implies, is where the original version of your web files is locatedâthe computer where your website is hosted.
If there isnât a CDN in place, visitors to your website must request information and receive responses directly from your websiteâs primary source. This method of direct communication can pose considerable demands on the origin server. Specifically: (a) each request routed to your origin means the web serverâs workload increases; and (b) the farther away an end user is from the origin, the longer that user will wait for pages to load.
What is a caching server?
Caching servers are core components of the content delivery network. They are computers that hold copies, or cached versions, of website content retrieved from your origin server, and deliver this stored content upon request. Caching servers work as reverse proxiesâimportant connection points placed in front of web servers that function as intermediaries for end-user requests. Reverse proxies intercept these requests, forward them to web servers, and transmit the responses back to your websiteâs visitors.
These servers are located at a point of presence (see below), one of the physical data centers spread out across the world.
Letâs distinguish between the two levels of caching that take place here:
Edge servers are the main building blocks within CDN; among other duties, their role is to execute the first level of caching. The main distinctive feature of the edge servers is to be as close to the end-user as possibleâthereby reducing the round-trip time between end users and the origin server.
Having user requests resolved at the network edge can be very advantageous for website owners. By providing your siteâs visitors with the ability to access cached content from edge servers that are physically closer to them, you are reaping a dual benefit: faster load times for end users expecting content, which promotes customer loyalty, and reduced workload demand on the origin server, which translates to more reliable, more consistent uptime. These advantages are particularly useful whenever there is a pronounced surge or sudden spike in traffic.
Edge servers can also be a carrier for additional functionality; for example, as a unit for edge computing, when an edge server can perform certain computational tasks.
![Scheme of content delivery via CDN edge servers](https://assets.gcore.pro/blog/what-is-a-cdn/2.jpg)
Shielding servers (origin shields) are about the second level of caching. They, too, function as a reverse proxy, and âcoverâ the origin server from being overloaded, working as an âoriginâs twinâ within the networkâall requests from the edges go to the shielding servers instead of the origin.
While edge servers defend against DDoS attacks and other threats from bad actors, shielding servers protect the origin from any overwhelming spikes or surges from the âgood guysââlegitimate traffic that is too voluminous at the moment. By proxying requests and masking the origin, a shielding server adds another layer of protection.
![Scheme of content delivery via CDN shield server and edge servers](https://assets.gcore.pro/blog/what-is-a-cdn/3.jpg)
What is a point of presence (PoP)?
Points of presence is a general term describing locations and geographical coverage of the network. Usually, the point of presence is a synonym for the data center where caching (whether itâs edge or shielding) servers are hosted. A multitude of PoPs distributed across the globe make up a CDN as we know it.
When describing or assessing the extent of your CDN coverage, the term âPoPâ can also be used synonymously with âedge servers.â
Additional benefits of an effective CDN
Alongside the larger, overarching mission that a CDN is tasked withâminimizing latency and reducing bandwidth consumption, increasing website availability performance, improving and ensuring security across all aspects of the networkâthere exists other capabilities that website owners can benefit from. Letâs take a quick look.
- Dynamic content acceleration: Dynamically generated assetsâcontent where the information is dependent upon usersâ requestsâand API calls could have a shorter latency when employing a CDN, since TLS handshaking is established with the edge servers located close to the users awaiting that content, not with the origin.
- File compression: Compressed data travels faster than uncompressed data. The two most widely-used algorithms for compression, Gzip and Brotli, have their own distinct attributes (the former is older, and was initially created to compress files; the latter was designed specifically to compress streams of data for the web). But the bottom line translates to clear value: CDNs harnessing file compression capabilities means reducing the size of data being transmitted, which reduces traffic costs and increases website speed.
- Image optimization: Image formats like WebP and AVIF have functionalities tied to the benefits of compression listed above, as optimizing images helps what is likely a large part of your websiteâs content get effectively cropped and quickly resized for fast loading on usersâ devices. This speed is only enhanced by harnessing the power of a CDNâaside from the user experience benefits your visitors will appreciate, it can also boost your siteâs SEO rankings.
- Optimized video streaming: Just as the shift toward mobile is becoming more prevalent, perhaps dominant, with respect to how users access content, so too is the need for website and app owners to ensure they have video available on demand, 24/7 and uninterrupted. Using low latency and ultra-low latency streaming protocols helps provide the best possible user experience. This is especially applicable for businesses focused on broadcasting media or online entertainment, for example, as these sectors benefit from a CDNâs ability to deliver consistent regional coverage, and do so with increased resiliency.
CDN use cases
As we wrap up this overview of content delivery networks, the purposes they serve and the mechanics behind how they work, letâs close with a few examples of use cases.
There will be a certain amount of overlap from the info we detailed above, since the challenges CDNs face and the benefits they provide (and how they provide them) have been covered in some detailâthe value weâve described exists because of real world applicationsâbut weâll take a moment here to display how those operating within certain industries would specifically capitalize on CDNs to meet their unique business needs.
![Diagram of how CDN is used in three areas: website acceleration, video streaming, and downloads&updates](https://assets.gcore.pro/blog/what-is-a-cdn/4.jpg)
Downloads and updates
An appropriate example here is the gaming industry. Games played via a website or an app can have massiveâand massively loyalâaudiences, provided everything about the companyâs CDN infrastructure runs smoothly. Millions of players are relying on its stability, and the performance that the network delivers. The absolute last thing these companies would want their users to experience is unbearably long download times when online gaming across certain regions of the globe is at its peakâor the day that a much-anticipated update is finally released.
Video streaming
This scenario is easy to visualize. A broadcast media company or provider delivering video for popular sporting events already depends on solid infrastructure; however, during exceptionally high demandâsay, the semi-finals of the World Cup, and in at least four countries every device in the country is counting on optimized, real-time streamingâa broadcast service provider operating in those countries will count on their CDN vendor to balance loads and intelligently route content delivery.
The CDN is tasked with optimizing distribution across its points of presence to ensure live streaming continues without interruptionâno goal is missed, so to speak.
Website acceleration
This is also an easy one to picture if we take e-commerce as an example. Everyone has had the frustrating experience waiting for, or being let down by, an inefficient website while simply trying to pay for something. E-commerce is huge, and m-commerce, the âsub-categoryâ of purchasing via mobile, is exploding in its own right. Websites and apps that display products or services for sale, and conduct financial transactions for those sales, should aim for the most accelerated webpage loading time possible.
The value a CDN brings to the table is crystal clearâcommunication distance is shortened. For an e-commerce company this is transactional in several ways: the faster a page from your website loads (reduced latency), the lower your bounce rate, the higher the conversion rate, and the more your brand trust grows amongst satisfied customers.
Conclusion
A CDN provides an efficient means of getting content hosted on a websiteâs server reliably distributed around the world and into the devices of clients, the end users. Its interconnected network of caching servers function as strategic intermediaries, fulfilling many client requests close to wherever those clients are located.
This shortened distanceâvia edge servers that are deployed closer to the end users instead of the originâaccelerates page loading times, which makes for happy clients expecting a positive user experience.
Furthermore, the infrastructure of a CDN is designed to keep website content consistently available, with latency at a minimum and site performance optimized. Equally significant: a properly configured CDN helps ensure that data is securely transmitted while mitigating surges or spikes in traffic and repelling threats and DDoS attacks.
Gcore CDN is a next-generation content delivery network that helps you accelerate the dynamic and static content of your websites or applications. Our CDN has many built-in web security features and operates through a rapidly growing infrastructure with over 140 points of presence worldwide.