Sign In
Sign In

What is a CDN: Principles of Content Delivery Networks

What is a CDN: Principles of Content Delivery Networks
Hostman Team
Technical writer
Infrastructure

Latency, latency, latency! It has always been a problem of the Internet. It was, it is, and it probably will be. Delivering data from one geographic point to another takes time.

However, latency can be reduced. This can be achieved in several ways:

  • Reduce the number of intermediate nodes on the data path from the remote server to the user. The fewer the handlers, the faster the data reaches the destination. But this is hardly feasible. The global Internet continues to grow and become more complex, increasing the number of nodes. More nodes = more power. That’s the global trend. Evolution!

  • Instead of regularly sending data over long distances, we can create copies of it on nodes closer to the user. Fortunately, the number of network nodes keeps growing, and the topology spreads ever wider. Eureka!

The latter option seems like an absolute solution. With a large number of geographically distributed nodes, it's possible to create a kind of content delivery network. In addition to the main function—speeding up loading—such a network brings several other benefits: traffic optimization, load balancing, and increased fault tolerance.

Wait a second! That's exactly what a CDN is—Content Delivery Network. So, let’s let this article explain what a CDN is, how it works, and what problems it solves. 

What is a CDN?

A CDN (Content Delivery Network) is a distributed network of servers designed to accelerate multimedia content delivery (images, videos, HTML pages, JavaScript scripts, CSS styles) to nearby users.

Like a vast web, the CDN infrastructure sits between the server and the user, acting as an intermediary. Thus, content is not delivered directly from the server to the user but through the powerful "tentacles" of the CDN.

What Types of Content Exist?

Since the early days of the Internet, content has been divided into two types:

  • Static (requires memory, large in size). Stored on a server and delivered to users upon request. Requires sufficient HDD or SSD storage.

  • Dynamic (requires processing power, small in size). Generated on the server with each user request. Requires enough RAM and CPU power.

The volume of static content on the Internet far exceeds that of dynamic content. For instance, a website's layout weighs much less than the total size of the images embedded in it.

Storing static and dynamic content separately (on different servers) is considered good practice. While heavy multimedia requests are handled by one server, the core logic of the site runs on another.

CDN technology takes this practice to the next level. It stores copies of static content taken from the origin server on many other remote servers. Each of these servers serves data only to nearby users, reducing load times to a minimum.

What Does a CDN Consist Of?

CDN infrastructure consists of many geographically distributed computing machines, each with a specific role in the global data exchange:

  • User. The device from which the user sends requests to remote servers.
  • Origin Server. The main server of a website that processes user requests for dynamic content and stores the original static files used by the CDN as source copies.
  • Edge Node. A server node in the CDN infrastructure that delivers static content (copied from the origin server) to nearby users. Also called a Point of Presence (PoP).

A single CDN infrastructure simultaneously includes many active users, origin servers, and edge nodes.

What Happens Inside a CDN?

First, CDN nodes perform specific operations to manage the rotation of static content:

  • Caching. The process of loading copies of content from the origin server to a CDN server, followed by optimization and storage.
  • Purge (Cache Clearing). Cached content is cleared after a certain period or on demand to maintain freshness on edge nodes. For example, if a file is updated on the origin server, the update will take some time to propagate to the caching nodes.

Second, CDN nodes have several configurable parameters that ensure the stable operation of the entire infrastructure:

  • Time to Live (TTL). A timeout after which cached content is deleted from an edge node. For images and videos, TTL can range from 1 day to 1 year; for API responses (JSON or XML), from 30 seconds to 1 hour; HTML pages may not be cached at all. CDN nodes usually respect the HTTP Cache-Control header.
  • Caching Rule. A set of rules that determines how an edge node caches content. The primary parameter is how long the file remains in the cache (TTL).
  • Restriction. A set of rules on the edge node that moderates access to cached content for security purposes. For example, an edge node may serve requests only from nearby IP addresses or specific domains.

Thus, static content flows from the origin server through edge nodes to users, cached based on specific caching rules, and cleared once the TTL expires. Meanwhile, access restrictions are enforced on every edge node for security.

How Does a CDN Work?

Let's see how a CDN works from the user's perspective. We can divide the process into several stages:

  1. User Request Execution. When a user opens a website, the browser sends requests to CDN servers specified in HTML tags or within JavaScript code (such as Ajax requests). Without a CDN, requests would go directly to the origin server.
  2. Finding the Nearest Server. Upon receiving the request, the CDN system locates the server closest to the user.
  3. Content Caching. If the requested content is in the cache of the found CDN server, it is immediately delivered to the user. If not, the CDN server sends a request to the origin server and caches the content.
  4. Data Optimization. Content copies on CDN servers are optimized in various ways. For example, files can be compressed using Gzip or Brotli to reduce size.
  5. Content Delivery. The optimized and cached content is delivered to the user and displayed in their browser.

For instance, if a website’s origin server is in Lisbon and the user is in Warsaw, the CDN will automatically find the nearest server with cached static content—say, in Berlin.

If there is no nearby CDN server with cached content, the CDN will request the origin server. Subsequent requests will then be served through the CDN.

The straight-line distance from Warsaw to Lisbon is about 2800 km, while the distance from Warsaw to Berlin is only about 570 km.

Someone unfamiliar with networking might wonder: “How can a CDN speed up content delivery if data travels through cables at the speed of light—300,000 km/s?”

In reality, delays in data transmission are due to technical, not physical, limitations:

  • Routing. Data passes through many routers and nodes, each adding small delays from processing and forwarding packets.
  • Network Congestion. High traffic in some network segments can lead to delays and packet loss, requiring retransmissions.
  • Data Transmission Protocols. Protocols like TCP include features such as connection establishment, error checking, and flow control, all of which introduce delays.

Thus, the difference between 2800 km and 570 km is negligible in terms of signal propagation. But from a network infrastructure perspective, it makes a big difference.

Moreover, a CDN server in Berlin, finding no cached content, might request it not from the origin server but from a neighboring CDN node in Prague, if that node has the content cached.

Therefore, CDN infrastructure nodes can also exchange cached content among themselves.

What Types of CDN Exist?

There are several ways to classify CDNs. The most obvious is based on the ownership of the infrastructure:

  • Public. The CDN infrastructure is rented from a third-party provider. Suitable for small and medium-sized companies.
  • Private. The CDN infrastructure is deployed internally by the company itself. Suitable for large companies and IT giants.

Each type has its own pros and cons:

 

Public

Private

Connection speed

High

Low

Initial costs

Low

High

Maintenance complexity

Low

High

Cost of large-scale traffic

High

Low

Control capabilities

Low

High

Dependence on third parties

High

Low

Many CDN providers offer free access to their infrastructure resources to attract users. However, in such cases, there are limitations on:

  • Server capacity
  • Traffic volumes
  • Geographical coverage
  • Advanced configuration options

Paid CDN providers use various pricing models:

  • Pay-as-you-go. Costs depend on the volume of data transferred, measured in gigabytes or terabytes.
  • Flat-rate pricing. Costs depend on the chosen plan with a fixed amount of available traffic.
  • Request-based pricing. Costs depend on the number of user requests made.

Deploying your own CDN infrastructure is a serious step, usually justified by strong reasons:

  • Public CDN costs exceed the cost of running your own infrastructure. For example, high expenses due to massive multimedia traffic volumes.
  • The product hits technical limitations of public CDNs. For example, heavy network loads or a specific user geography.
  • The project demands higher reliability, security, and data privacy that public CDNs cannot provide. For example, a government institution or bank.

Here are a few examples of private CDN networks used by major tech companies:

  • Netflix Open Connect. Delivers Netflix’s streaming video to users worldwide.
  • Google Global Cache (GGC). Speeds up access to Google services.
  • Apple Private CDN. Delivers operating system updates and Apple services to its users.

What Problems Does a CDN Solve?

CDN technology has evolved to address several key tasks:

  • Faster load times. Files load more quickly (with less latency) because CDN servers with cached static content are located near the user.
  • Reduced server load. Numerous requests for static content go directly to the CDN infrastructure, bypassing the origin server.
  • Global availability. Users in remote regions can access content more quickly, regardless of the main server’s location.
  • Protection against attacks. Properly configured CDN servers can block malicious IP addresses or limit their requests, preventing large-scale attacks.
  • Traffic optimization. Static content is compressed before caching and delivery to reduce size, decreasing transmitted data volumes and easing network load.
  • Increased fault tolerance. If one CDN server fails or is overloaded, requests can be automatically rerouted to other servers.

The CDN, being a global infrastructure, takes over nearly all core responsibilities for handling user requests for static content.

What Are the Drawbacks of Using a CDN?

Despite solving many network issues, CDNs do have certain drawbacks:

  • Costs. In addition to paying for the origin server, you also need to pay for CDN services.
  • Privacy. CDN nodes gain access to static data from the origin server for caching purposes. Some of this data may not be public.
  • Availability. A site’s key traffic may come from regions where the chosen CDN provider has little or no presence. Worse, the provider might even be blocked by local laws.
  • Configuration. Caching requires proper setup. Otherwise, users may receive outdated data. Proper setup requires some technical knowledge.

Of course, we can minimize these drawbacks by carefully selecting the CDN provider and properly configuring the infrastructure they offer.

What Kind of Websites Use CDNs?

In today’s cloud-based reality, websites with multimedia content, high traffic, and a global audience are practically required to use CDN technology. Otherwise, they won’t be able to handle the load effectively.

Yes, websites can function without a CDN, but the question is, how? Slower than with a CDN.

Almost all major websites, online platforms, and services use CDNs for faster loading and increased resilience. These include:

  • Google
  • Amazon
  • Microsoft
  • Apple
  • Netflix
  • Twitch
  • Steam
  • Aliexpress

However, CDNs aren’t just for the big players — smaller websites can benefit too. Several criteria suggest that a website needs distributed caching:

  • International traffic. If users from different countries or continents visit the site. For example, a European media site with Chinese readers.
  • Lots of static content. If the site contains many multimedia files. For example, a designer’s portfolio full of photos and videos.
  • Traffic spikes. If the site experiences sharp increases in traffic. For example, an online store running frequent promotions or ads.

That said, there are cases where using a CDN makes little sense and only complicates the web project architecture:

  • Local reach. If the site is targeted only at users from a single city or region. For example, a website for a local organization.
  • Low traffic. If only a few dozen or hundreds of users visit the site per day.
  • Simple structure. If the site is a small blog or a minimalist business card site.

Still, the main indicator for needing a CDN is a large volume of multimedia content.

Where Are CDN Servers Located?

While each CDN’s infrastructure is globally distributed, there are priority locations where CDN servers are most concentrated:

  • Capitals and major cities. These areas have better-developed network infrastructure and are more evenly spaced worldwide.
  • Internet exchange points (IXPs). These are locations where internet providers exchange traffic directly. Examples include DE-CIX (Frankfurt), AMS-IX (Amsterdam), LINX (London).
  • Data centers of major providers. These are hubs of major internet backbones that enable fast and affordable data transmission across long distances.

The smallest CDN networks comprise 10 to 150 servers, while the largest can include 300 to 1,500 nodes.

Popular CDN Providers

Here are some of the most popular, large, and technologically advanced CDN providers. Many offer CDN infrastructure as an add-on to their cloud services:

  • Akamai
  • Cloudflare
  • Amazon CloudFront (AWS CDN)
  • Fastly
  • Google Cloud CDN
  • Microsoft Azure CDN

There are also more affordable options:

  • BunnyCDN
  • KeyCDN
  • StackPath

Some providers specialize in CDN infrastructure for specific content types, such as video, streams, music, or games:

  • CDN77
  • Medianova

Choosing the right CDN depends on the business goals, content type, and budget. To find the optimal option, you should consider a few key factors:

  • Goals and purpose. What type of project needs the CDN: blog, online store, streaming service, media outlet?
  • Geography. The provider's network should cover regions where your target audience is concentrated.
  • Content. The provider should support caching and storage for the type of content used in your project.
  • Pricing. Which billing model offers the best value for performance?

In practice, it’s best to test several suitable CDN providers to find the right one for long-term use.

In a way, choosing a CDN provider is like choosing a cloud provider. They all offer similar services, but the implementation always differs.

Conclusion

It’s important to understand that a CDN doesn’t fully store static data; it only distributes copies across its nodes to shorten the distance between the origin server and the user.

Therefore, the main role of a CDN is to speed up loading and optimize traffic. This is made possible through the caching mechanism for static data, which is distributed according to defined rules between the origin server and CDN nodes.

Infrastructure

Similar

Infrastructure

Private Cloud In Cloud Computing: Benefits and When To Use

What is a cloud? It’s virtualized server resources: RAM, processor power, disk space, and installed applications. The main advantage of the cloud-based approach to infrastructure is flexibility. If you need more performance, you can easily add memory or connect additional processing power when the load increases. Difference Between Private, Public, and Hybrid Clouds Below is the standard classification of cloud services: Private Cloud: The infrastructure is used by only one organization. The equipment can be located either at the provider’s site or on the user’s premises. Public Cloud: The infrastructure is shared by all registered users. Examples include Amazon Web Services, Microsoft Azure, and Hostman. Hybrid Cloud: A combination of private and public infrastructure. Part of the equipment may be located with the user, and part with the provider. From this classification, it’s clear that hybrid clouds are a compromise solution. However, using them isn’t always justified. To understand this better, let’s compare all three types across several parameters. Comparison Table Parameter Private Public Hybrid Complexity High level of complexity. Requires selecting equipment and developing architecture. Low level of complexity. You choose a suitable service and pay for it. High level of complexity. You need to configure the private part and connect it with the external infrastructure. Cost Expenses are borne by the owner of the equipment and licenses. Expenses are borne by the provider; the user pays a service fee. Expenses are partly on the user, partly on the provider. Maintenance The organization must monitor the system and fix failures itself. The provider manages the infrastructure. The organization must monitor its private part. Scalability Additional resources must be purchased and configured manually. Additional resources are available on demand. Additional resources are available on demand. Security High, as everything is under the owner’s control. Lower level of control; many security aspects remain the provider’s responsibility. High level of security with proper architecture, when all critical nodes are located in the private cloud. Private Cloud Advantages and Disadvantages The comparison table above clearly shows the pros and cons of private clouds. Let’s look at them in more detail. Advantages: Physical access to the equipment usually remains only with the owner. It’s also possible to limit internet connections to prevent unauthorized data access. You can save on physical equipment by investing in the development of a virtual infrastructure instead. Flexible configuration of resources and computing power for different departments within the company. Disadvantages: Requires significant financial investment: you can’t build it without purchasing or renting equipment. System design and deployment take a lot of time. Scalability is limited by the available physical resources. If more capacity is needed, new equipment must be purchased. When to Create a Private Cloud Now that we understand what a private cloud is and what its pros and cons are, let’s figure out when companies choose this approach. The main scenario comes from how a private cloud operates. Large organizations often have enough resources to purchase equipment, design a well-thought-out architecture, and fund teams of specialists to maintain the system. Such companies also tend to handle large volumes of data that require a high level of security. Based on this scenario, the main users of private clouds are: Mobile network operators Banks Insurance companies Gas and oil enterprises Retail companies The types of data that companies host in their private cloud environments can vary, but they generally fall into two main categories: Confidential or proprietary information, for which the organization must retain full control. Security policies or internal regulations may prohibit the use of public cloud servers, leaving private infrastructure as the only viable option. Data governed by strict legal or industry-specific compliance requirements. For instance, certain privacy laws or standards (such as GDPR, HIPAA, or PCI DSS) require data to be stored in secure, controlled environments or within specific jurisdictions. In such cases, a private cloud is often the most suitable solution. It provides greater control over security and compliance, reduces regulatory risks, and allows for certification under relevant industry standards. Moreover, if the company later needs to expand its infrastructure to store or process less sensitive data, it can integrate a public cloud and adopt a hybrid model, combining flexibility with strong data protection.
17 October 2025 · 4 min to read
Infrastructure

Hardware Virtualization: What It Is, Its Types, and Benefits

Hardware virtualization allows creating virtual machines (VMs) on physical hardware while distributing resources as efficiently as possible. This article explains how it works, what types exist, and what advantages it provides for business. How It Works The basic level of any virtualization is the server. Data processing occurs on physical hardware, regardless of the level of abstraction. In hardware virtualization, a hypervisor is installed on the server. This is software that creates sets of virtual resources. There are two main types of hypervisors: Type 1 (bare-metal), which runs directly on the hardware, and Type 2 (hosted), which runs on top of a host operating system. Both create and manage virtual machines, but Type 1 generally offers higher performance. We have covered hypervisors in detail in a separate article. The top layer of abstraction is the virtual machine. At first glance, it does not differ from a traditional server. Essentially, a VM consists of a single virtual disk and files describing its configuration. The virtual machine is installed on the hardware hypervisor. Once the VM is prepared, operating systems and application software can be installed on it. A helpful analogy is a book. Imagine a physical server with installed software as a book on a shelf. You can pick it up and move it physically, but creating a copy to give to someone else requires significant effort: retyping or scanning each page, assembling the pages, and binding the book. A configured VM with allocated resources and installed applications is like a digital version of the book. You can make unlimited copies with minimal time and effort. You can create a backup, transfer a copy to another machine, or share it with another user. Virtualization of CPUs and other resources enables this simplicity in deployment and management. Hardware Support For VMs to function efficiently, resource allocation must be supported at the processor level. Two major technologies exist from leading manufacturers: Intel VT and AMD-V. Both technologies have multiple development directions. The primary one is CPU virtualization, which allows running multiple systems on a single processor, either in parallel or nested within each other. Technologies for virtualized graphics and input/output are also advancing. They facilitate remote access and sharing of physical hardware, which is useful for remote workstations or online gaming. These hardware extensions are particularly important for Type 1 hypervisors, allowing virtual machines to run at near-native performance without modifying the guest operating system. Types of Hardware Virtualization The main types of virtualization are: Full virtualization: hardware is fully emulated. This creates an environment that can run on different servers without lengthy configuration. Paravirtualization: a special version of the operating system is created for the virtual machine. It can be modified or recompiled based on the server's hardware resources. This method was historically used to improve performance, but modern hardware virtualization extensions have largely reduced its advantage. Hardware-assisted virtualization: a fully virtualized VM is created using the computer's physical hardware with support from processor extensions (Intel VT/AMD-V). The choice of type depends on the tasks to be solved. Differences Between Hardware and Software Virtualization Hardware virtualization is not the only approach. Software virtualization relies on a host system and adds an extra layer of abstraction: Physical server with resources Host operating system Hypervisor installed on the host OS (Type 2 hypervisor) Virtual machines installed and managed via the hypervisor Adding this extra layer complicates the process and reduces hardware performance. Physical resources are consumed by both the host OS and the hypervisor. Other issues include: If the host system fails, all VMs running on it lose access to physical resources. Security risks become larger; if the host OS is compromised, all VMs are at risk. Updating or reinstalling the host OS requires stopping the VMs. Software virtualization is suitable for simple tasks, such as testing another operating system inside the main one, avoiding the need to install multiple OSes side by side. For business purposes, hardware virtualization is preferred because it provides higher performance and security. The key is efficient resource usage. Business Advantages Virtualization technology offers several benefits: Cost efficiency: reduces expenses for purchasing, configuring, and maintaining physical hardware. Instead of multiple servers, a single powerful machine can be used, with the virtualization system dividing resources among VMs performing different tasks. Flexibility: VM configurations can be saved as images and deployed across different hardware or moved between servers. Scalability: when workload increases, additional VMs can be quickly launched to add resources and stabilize operations. Fault tolerance: VM snapshots can be created at any time. Copies can be distributed geographically, so even if part of the hardware fails, the infrastructure continues to function. The load on active components can be managed by adding extra resources. Security: VMs are isolated from each other. Compromising one VM does not affect others. Conclusion With hardware virtualization, external applications cannot distinguish virtual machines from physical servers. Guest operating systems run on the CPU without knowledge of other OSes sharing the same hardware. This isolation helps maintain high security. Virtualization is used by large companies, small and medium businesses, and individual users. It enables building a flexible infrastructure of any size that can be easily scaled and protected against internal and external threats.
17 October 2025 · 5 min to read
Infrastructure

What Is a Virtual Data Center (vDC): Its Capabilities and Purpose

Virtual Data Center is infrastructure resources in the “cloud” allocated for business needs. Physically, the equipment is located in traditional data centers. The provider rents it out using virtualized space. A virtual data center (vDC) can be managed from anywhere in the world via a console. At the same time, the flexibility of such a solution is higher than that of a traditional data center. There are also advantages in terms of cost efficiency, scalability, and security, which we will discuss below. Virtualization Layers A virtual data center is a multi-layered system, where virtualization is applied at each level. There are five main layers: Network. Virtualization allows configuring communication between multiple servers to build a unified infrastructure. Storage. Administrators manage file placement at this level, which is convenient even if the data is stored on different devices. Resources. Virtualization enables flexible adjustment of available computing power, changing resource usage based on business needs. Applications. Virtualization solves compatibility issues, allowing applications to run independently of the host operating system. Access. User rights management, for example, for remote system access. These layers are interdependent. A virtual data center operates correctly only if interactions between the layers are properly configured. vDC Capabilities The main advantage of a virtual data center is the ability to quickly scale resources up or down, allowing businesses to address various tasks without contacting the service provider. Other important capabilities include: Data protection. Storing information in a vDC significantly reduces the risk of data loss, especially when backups are properly configured and geographically distributed. Disaster recovery. With a simple and fast backup system, the infrastructure can be restored within minutes. Flexibility. IT teams can automate routine tasks, quickly implement and test new systems and features. Reliability. Providers use high-performance equipment and maintain the physical infrastructure of the vDC. Control. All monitoring and management tools are available to the customer who ordered and paid for the resources. Cost savings on hardware. There is no need to buy, configure, or maintain physical equipment; the provider handles this. Customers pay only for the resources they use. Another important aspect is the availability of different billing models. Customers can either pay a fixed monthly amount for allocated resources or only for the resources actually consumed. Both models guarantee that the provider will allocate the requested resources, preventing situations where the client requests capacity but does not receive it in full. Scalability Features One of the main advantages of a virtual data center is rapid scalability. When demand increases, add resources; when demand decreases, reduce unused capacity to save costs. Scalability can be of two types: Horizontal scaling: new elements are added. For example, if an application normally runs on two servers but user demand increases fivefold, additional servers can be added and users distributed among them. Vertical scaling: additional resources are added to an existing server. For instance, RAM can be increased, storage expanded, or the server replaced with a more powerful one if the CPU cannot handle the load. Horizontal and vertical scaling are not mutually exclusive and often complement each other. Horizontal scaling is usually used for expanding server clusters, while vertical scaling is applied when increasing load without adding new servers. A single task can be addressed with either horizontal or vertical scaling in a vDC. Example: A web server hosting a website experiences increased traffic. Vertical scaling would involve adding CPU, RAM, or storage to the existing server. Horizontal scaling would involve cloning the server and distributing the load across multiple virtual machines. Use Cases A virtual data center can fully replace physical infrastructure and help address almost any business task. Common scenarios include: Data storage Software development and testing Increasing capacity using reserve resources during peak loads Creating a backup data center that fully replicates the main data center Setting up remote workstations These are just a few typical use cases. In practice, vDCs can be beneficial in many situations. However, this solution is not suitable for everyone, partly because vDCs are usually more expensive than standalone cloud servers. Suitable for: Medium or large companies planning or already migrating some processes to the cloud. Companies with seasonal fluctuations or plans to increase load. Startups that need to minimize infrastructure costs initially but be prepared for rapid growth. The final decision on whether to deploy a virtual data center should involve IT specialists, economists, analysts, and managers responsible for strategic development, so everyone understands what a vDC is and the risks and benefits of its implementation.
16 October 2025 · 4 min to read

Do you have questions,
comments, or concerns?

Our professionals are available to assist you at any moment,
whether you need help or are just unsure of where to start.
Email us
Hostman's Support