Many online activities, from distributing media files to minimizing the load time of a website’s static files, are critical to both the content owner and its visitors (users). With websites’ need to deliver content quickly and solve delay problems, the use of CDN technology is now offered as a real solution. So, designing a proper CDN architecture to distribute optimized content to users worldwide is essential.
The choice of infrastructure architecture is critical to shaping the CDN product’s identity while determining its offering’s value. The main building blocks of CDN infrastructure are PoPs (Points of Presence). PoPs are regional data centers whose task is to communicate with users in the vicinity of these PoPs.
Using regional content distribution centers reduces Round-Trip Time (RTT). It makes your website faster for all visitors, regardless of their geographic location.
Each PoP consists of multiple servers and routers responsible for caching, connection optimization, and other content delivery features. For CDNs that provide security solutions, PoPs include DDoS prevention mechanisms, which perform other security-related functions.
Remember, a CDN’s job is to improve your regular hosting by reducing bandwidth consumption, minimizing latency, and providing the scalability needed to handle unusual traffic loads. To accomplish all the mentioned things, designing a very robust network architecture is necessary.
History of CDN
The content distribution network was created almost 20 years ago to deal with the challenge of quickly sending large amounts of data to Internet users. The first content distribution networks were built in the late 1990s, accounting for 15-30% of global traffic. As the types of content, such as video, audio, and other data on the Internet, more CDNs have been created and developed. In general, the evolution of CDNs can be classified into 4 generations:
- Pre-Formation Period: Before CDNs were created, the required technologies and infrastructure were developed. This course includes creating server farms (server deployment bases), storing information, improving web servers, and deploying proxy and cache.
- First Generation: The first period of content distribution networks was mainly focused on providing dynamic and static content. The primary purpose of this generation was to copy the content, intelligently find the path and perform calculations to deliver the content to the user. Programs and information were divided into servers to be served.
- Second Generation: At this time, CDNs were fully implemented. More focus was on audio and video content according to user demand. This generation started serving smartphone users and used P2P techniques and cloud computing.
- Third Generation: This generation is where we are and is still researching, developing, and evolving. The goal of this generation is that CDNs are widely used in the web space so that users at any level experience the best quality.
Content distribution networks were initially created to reduce the pressure on bandwidth as the demand for streaming video on the web increased. Also, with the development of this system and the increase in its use in the web world, the costs of CDN services decreased.
How Does a CDN Work?
A CDN provider installs its servers in key locations on the Internet. Each server includes large amounts of local storage and the ability to synchronize copies of its data with other servers in the content network through a replication process. These servers act as data stores.
To effectively deliver stored data to customers worldwide, CDN providers place their servers in geographically dispersed edge locations—places that connect directly to the Internet backbone. Usually in data centers near large Internet service providers (ISPs). Some of them are called Point of Presence (PoP) or “edge servers”.
A content publisher wishes to distribute its content through CDN to the user. CDN providers give publishers access to their server network where original versions of content objects (typically files or groups of files) can be uploaded for distribution and storage. Providers also store URLs, or scripts publishers embed on their sites to point to stored assets.
When Internet clients (web browsers or similar applications) send requests for content, the publisher’s receiving server responds and forwards the requests to CDN servers as needed. Appropriate CDN servers are selected to deliver content according to the customer’s geographic location. A CDN effectively brings data closer to the requester to minimize the effort required to transmit it over the Internet.
If a CDN server is requested to send content but does not have a copy, the server will request the original CDN server for one. In addition to passing the copy to the requester, a CDN (cache) server will store a copy so that subsequent requests for the same object can be made without requesting the parent again. Objects are removed from the cache either when the server needs to free up space (a process called eviction) or when they have not been requested for a while (a process called aging).
Four Principles of CDN Design
The following four principles should be considered in the design of any CDN.
Performance
One of the main tasks of a CDN is to minimize latency. From an architectural point of view, this means that for optimal connectivity, PoPs should be located at key intersections in the center of the network, where data moves.
Another important point is physical facilities. As a general rule, a CDN PoP should be located in a privileged data center where backbone providers and CDNs are peering with one another and other peer agreement operators. Such agreements enable CDNs to significantly reduce round-trip times and improve bandwidth utilization.
Scalability
CDNs built for high-speed, high-volume routing should be able to handle any amount of traffic. The CDN architecture must meet these expectations by providing network resources and mass processing at all levels, down to the computing and storage resources available in each storage server.
As expected, CDNs that provide DDoS security services require much higher scalability. They deploy dedicated servers built to mitigate DDoS attacks (scrubbers) to address these needs. Individually, these dedicated servers can handle large volumes of traffic and process tens of gigabytes per second.
Reliability
The scale of the CDN infrastructure turns a flawless system into a statistically improbable system. However, this same scale can help ensure record resiliency and high availability, which CDN providers can commit to their service level agreements (SLAs).
Commercial CDNs adopt a “no point of failure” approach by carefully phasing maintenance cycles and integrating redundant hardware and software. Also, many of them have managed recovery systems to redirect traffic around downed servers. Additionally, for added redundancy, CDN providers deal with multiple operators and rely on dedicated out-of-band management channels, which allow interaction with servers in the event of a disaster.
Responsiveness
To improve responsiveness, CDNs must make configuration changes as quickly as possible; network response time is measured as the time it takes for changes to take effect.
Note that even the smallest configuration changes, such as a command to delete a specific image from the cache or add an IP address to the IP blacklist, must be sent to all POPs. The larger and more geographically spread the network, the longer it will take to do this.
To ensure a good quality of customer service, the CDN should be designed with rapid configuration deployment in mind.
CDN Topology
As we mentioned before, one of the primary missions of a CDN is to minimize latency. Speaking of architecture, we need to optimize the state of the connections between the main components. That is the same POPs that are responsible for transferring information.
Following this article, we will discuss the two main topologies of CDNs, namely, Scattered CDN and Consolidated CDN, and we will explain the advantages and disadvantages of each.
Scattered CDN
Scattered CDNs include a large number of medium and low-capacity PoPs that are clustered in densely populated geographic areas. This topology focuses on optimal physical proximity between the requesting user and the POP. As a result, you may see PoPs very close together.
The first generations of CDNs were based on this distributed model. Over time, and as global connectivity continues to improve, the benefits of minimizing the physical distance to servers have diminished. Moreover, as CDNs continued to introduce more customization features, the scattered topology hindered systems responsiveness, thereby preventing rapid deployment.
However, even today, the proximity of the server to the user is significant. Scattered CDNs provide outstanding performance in speed improvement, especially in areas where the number of users is low. In addition, small PoPs make the deployment process much easier and enable rapid growth of network coverage.
Advantages
- Short physical distance minimizes latency.
- It has a good effect on areas with few users or the number of connections from that area.
- Small POPs speed up the deployment process.
Disadvantages
- The maintenance cost is very high in this architecture.
- Due to many connection points, the time to send and receive the response will be long.
- Deploying new configurations on this number of POPs is labor-intensive and time-consuming.
Consolidated CDN
Consolidated CDNs deploy a small number of high-capacity PoPs in core data centers to serve a broader population. This network topology represents a more modern approach to content delivery made possible by the evolution of Internet connectivity.
The main advantage of the consolidated CDN topology is its centralized infrastructure, which enables agile management and rapid configuration deployment. This benefits end users and network operators and generally improves responsiveness. In addition, high-capacity PoPs are more resilient, especially when it comes to mitigating DDoS attacks.
Unlike the previous architecture, it has been proven that the consolidated CDN topology performs worse in low-connectivity areas. High-capacity PoPs require more complex deployment, which hinders rapid network expansion.
Advantages
- High-capacity servers perform better in repelling and reducing DDoS attacks.
- They provide the possibility of agile deployment.
- The cost of maintenance is reduced.
Disadvantages
- They do not perform well in low-connection areas.
- High-capacity POPs have more difficult deployment procedures.
CDN Architecture
There are two main layers in the content delivery network which perform the functions of CDNs:
- DNS Layer: directs users to the nearest server.
- Reverse Proxy Layer: It imitates the website server and has additional functions, such as cache storage or firewall protection.
These components work together to reduce the time it takes to get content and serve visitors. These two layers form the basic features of a CDN, as the reverse proxy layer can contain many different reverse proxies, such as:
- Caching Proxy
- Web Application Firewall (WAF)
- A reverse proxy that enables A/B testing
Although CDNs may focus on different things, such as performance or security, they all rely on the basic configuration of distributed servers and the reverse proxies installed on those servers.
CDN, DNS, and ISP Networks
The term CDN stands for Content Delivery Network. In fact, it’s an interconnected network of servers that are spread out geographically, and its goal is to enable a company using it to distribute its data more quickly. The majority of the time, these servers are kept in data centers linked to the Internet Service Provider, or ISP.
Consider the scenario when you wish to access a server in America but you are in Singapore. Typically, a DNS request would be required from your web browser. Every time you conduct an Internet search, your computer (a DNS client) sends a request to a DNS server in this manner. Normally, this happens relatively instantly, although distance has an impact. So, a request from a computer in America to a server in America would be processed much more quickly than one from a computer in Singapore.
Therefore, we employ CDN to reduce transmission costs and improve user experience. In short, this works by having a corporation employ a CDN provider to handle domain management. These domains may be located anywhere in the world, including the US, Japan, the EU, and so forth.
In general, the CDN DNS server will answer a DNS request by providing the Internet Protocol address that is nearest to the request’s geographic origin.
Advantage of CDN Architecture
It is advantageous to use a content delivery network (CDN) to deliver your content as it provides various benefits, including reduced latency and a faster loading website for your visitors. CDNs also provide many additional advantages, such as reduced bandwidth costs. However, other important benefits exist to using a CDN’s infrastructure for content delivery. For example:
Downtime Protection and Reliability
Due to removing a large portion of the workload from the origin server, CDNs allow for easy scaling in the event of sudden spikes in traffic. A CDN can handle enormous bandwidth usage by providing vast resources to enable the connection to the server to scale as necessary.
Consequently, since more users are accessing the website, the origin server is less likely to become overburdened. CDNs will also increase reliability since if one PoP goes down, traffic will be diverted to another, thus increasing the level of redundant traffic on the site.
Increased Security
Using a CDN provides increased protection against things such as DDoS attacks since a CDN has many servers. Most CDNs, including KeyCDN, have several measures to mitigate the risk of attacks.
As well as providing additional security features, CDNs may offer additional security features like SSL for establishing a secure connection between the CDN servers and the users and the ability to create a Secure Token that will allow users to access the CDN servers.
Improved SEO
Having a faster website will not only enhance the user experience but also improve your search engine ranking, as Google uses site speed as a ranking factor. Therefore, you will become more visible in search results by having a faster website.
By implementing enhancements such as HTTP/2 and SSD-optimized servers, a reliable and modern CDN architecture can increase the speed of delivery of content even further, allowing for a faster user experience.
With these additional advantages, you can enhance several aspects of a website.
Here in ArvanCloud, we will help you have the best CDN service experience. Visit ArvanCloud CDN for more details about the great and affordable packages that are provided. You can also contact us for a free consultation with our experts.