What is a CDN (Content delivery networks) ?


A CDN is an interconnected series of servers that cache, store, and distribute your content to many end-users simultaneously based on their proximity.

Every one of us interacts with CDNs on a daily basis; when reading articles on news sites, shopping online, watching YouTube videos or perusing social media feeds.
No matter what you do, or what type of content you consume, chances are that you’ll find CDNs behind every character of text, every image pixel and every movie frame that gets delivered to your PC and mobile browser.

To understand why CDNs are so widely used, you first need to recognize the issue they’re designed to solve.

Known as latency, it’s the annoying delay that occurs from the moment you request to load a web page to the moment its content actually appears onscreen.
That delay interval is affected by a number of factors, many being specific to a given web page. In all cases however, the delay duration is impacted by the physical distance between you and that website’s hosting server. A CDN’s mission is to virtually shorten that physical distance, the goal being to improve site rendering speed and performance.

How a CDN Works

To minimize the distance between the visitors and your website’s server, a CDN stores a cached version of its content in multiple geographical locations (a.k.a., points of presence, or PoPs). Each PoP contains a number of caching servers responsible for content delivery to visitors within its proximity.
In essence, CDN puts your content in many places at once, providing superior coverage to your users. For example, when someone in London accesses your US-hosted website, it is done through a local UK PoP. This is much quicker than having the visitor’s requests, and your responses, travel the full width of the Atlantic and back.
This is how a CDN works in a nutshell. Of course, as we thought we needed an entire guide to explain the inner workings of content delivery networks, the rabbit hole goes deeper.
Studies show that a second-long delay causes a 7% drop in conversions, an 11% drop in page views and a 16% drop in customer satisfaction.

Selection is measured by choosing locations that have the fewest hops, number of seconds from the client or the highest availability of well-performing servers. As a result, the content is delivered way faster. This significantly improves user experience and satisfaction as well as maximizes the overall performance across the network.

Requests for content are directed through series of algorithms to the nodes. The number of nodes in a CDN varies depending on the architecture of the system. Many CDNs reach thousands of nodes with tens of thousands of servers located at remote points of presence (PoPs). The sets of PoPs, defined by the geographic coverage, are called “edges” or “edge networks” as they would be the closest edge of a CDN to the end-user.

The specific nodes are available from across many locations and backbones. Since they are linked, the nodes communicate with one another to fulfill requests for content which is transparently distributed to improve the delivery procedure. Optimizing the process typically includes reducing bandwidth costs, increasing the global availability of content and improving user performance by reducing page loading times.

CDN

Who uses a CDN?

Pretty much everyone, me too on this small website ! Today, over half of all traffic is already being served by CDNs. Those numbers are rapidly trending upward with every passing year. The reality is that if any part of your business is online, there are few reasons not to use a CDN especially when so many offer their services free of charge.
Yet even as a free service, CDNs aren’t for everyone. Specifically, if you are running a strictly localized website, with the vast majority of your users located in the same region as your hosting, having a CDN yields little benefit. In this scenario, using a CDN can actually worsen your website’s performance by introducing another unessential connection point between the visitor and an already nearby server.

Still, most websites tend to operate on a larger scale, making CDN usage a popular choice in the following sectors:

So What Can a CDN Do for Me?

Modern CDNs can handle numerous IT tasks, helping you to:

  • Improve page load speed
  • Handle high traffic loads
  • Block spammers, scrapers and other bad bots
  • Localize coverage without the cost
  • Reduce bandwidth consumption
  • Load balance between multiple servers
  • Protect your website from DDoS attacks
  • Secure your application

What are the CDN Building Blocks & PoPs (Points of Presence)

CDN PoPs (Points of Presence) are strategically located data centers responsible for communicating with users in their geographic vicinity. Their main function is to reduce round trip time by bringing the content closer to the website’s visitor. Each CDN PoP typically contains numerous caching servers.

Caching servers are responsible for the storage and delivery of cached files. Their main function is to accelerate website load times and reduce bandwidth consumption. Each CDN caching server typically holds multiple storage drives and high amounts of RAM resources.
SSD/HDD + RAM. Inside CDN caching servers, cached files are stored on solid-state and hard-disk drives (SSD and HDD) or in random-access memory (RAM), with the more commonly-used files hosted on the more speedy mediums. Being the fastest of the three, RAM is typically used to store the most frequently-accessed items.

Start Using a CDN

For a CDN to work, it needs to be the default inbound gateway for all incoming traffic. To make this happen, you’ll need to modify your root domain DNS configurations (e.g., domain.com) and those of your subdomains (e.g., www.domain.com, img.domain.com).

For your root domain, you’ll change its A record to point to one of the CDN’s IP ranges.

For each subdomain, modify its CNAME record to point to a CDN-provided subdomain address (e.g., ns1.cdn.com).

In both cases, this results in the DNS routing all visitors to your CDN instead of being directed to your original server.
If any of this sounds confusing, don’t worry. Today’s CDN vendors offer step-by-step instructions to get you through the activation phase.

Additionally, they provide assistance via their support team.

The entire process comes down to a few copy and pastes, and usually takes around five minutes.

Why isn’t a CDN a Default Part of my Website Hosting?

In an ideal world, a CDN would be an integral part of any website hosting. However, when CDNs were first established in the late 1990s, they were far too expensive and only accessible to the largest organizations.

Today things have changed and many hosting providers actually do offer CDN services as a checkbox add-on.

The Evolution OF CDNS

Commercial CDNs have been around since the ’90s. Like any other decades-old technology, they went through several evolutionary stages before becoming the robust application delivery platform they are today.
The path of CDN development was shaped by market forces, including new trends in content consumption and vast connectivity advancements. The latter has been enabled by fiber optics and other new communication technologies.
Overall, CDN evolution can be segmented into three generations, each one introducing new capabilities, technologies and concepts to its network architecture. Working in parallel, each generation saw the pricing of CDN services trend down, marking its transformation into a mass-market technology.

Why isn’t a CDN a Default Part of my Website Hosting?

In an ideal world, a CDN would be an integral part of any website hosting. However, when CDNs were first established in the late 1990s, they were far too expensive and only accessible to the largest organizations.

Today things have changed and many hosting providers actually do offer CDN services as a checkbox add-on.

Commercial CDNs have been around since the ’90s. Like any other decades-old technology, they went through several evolutionary stages before becoming the robust application delivery platform they are today.

The path of CDN development was shaped by market forces, including new trends in content consumption and vast connectivity advancements. The latter has been enabled by fiber optics and other new communication technologies.

Overall, CDN evolution can be segmented into three generations, each one introducing new capabilities, technologies and concepts to its network architecture. Working in parallel, each generation saw the pricing of CDN services trend down, marking its transformation into a mass-market technology.

Content delivery networks employ reverse proxy technology. Topology wise, this means CDNs are deployed in front of your backend server(s). This position, on the edge of your network perimeter, offers several key advantages beyond a CDN’s innate ability to accelerate content delivery.

Today, the reverse proxy topology is being leveraged by multi-purpose CDNs to provide the following types of solutions:

Website Security

Cybersecurity is all about managing outside access to your protected perimeter, ideally blocking all threats before they can even set foot on your doorstep.

Deployed on the edge of your network, a CDN is perfectly situated to act as a virtual high-security fence and prevent attacks on your website and web application. The on-edge position also makes a CDN ideal for blocking DDoS floods, which need to be mitigated outside of your core network infrastructure.

Load Balancing

Load balancing is all about having a “traffic guard” positioned in front of your servers, alternating the flow of incoming requests in such a way that traffic jams are avoided.

Clearly, a CDN’s reverse proxy topology is ideal for this, as is the default recipient of all incoming traffic. In addition, reverse proxy topology also provides a CDN with enhanced visibility into traffic flow. This lets it accurately gauge the amount of pending requests on each of the backend servers, thereby enabling more effective load distribution.

The choice of infrastructure architecture is critical to shaping a CDN’s product identity while also defining the value of its offering. The basic building blocks of CDN infrastructures are PoPs (points of presence)—regional data centers responsible for communicating with users in their proximity.

Using regional content distribution centers cuts down on round-trip time (RTT), making your website faster and more responsive for all visitors, regardless of their geolocation.

Typically, each PoP holds multiple servers and routers responsible for caching, connection optimization and other content delivery features. For CDNs providing security solutions, PoPs also hold DDoS scrubbing servers and machines responsible for other security-related functions.

Remember, a CDN’s job is to enhance your regular hosting by reducing bandwidth consumption, minimizing latency and providing the scalability needed to handle abnormal traffic loads. These tasks can only be achieved by a robust network architecture—one that turns your CDN into a dedicated fast lane on the information superhighway.

CDN infrastructure architecture

Round-Trip Time

Round-trip time (RTT) is the number of milliseconds (ms) it takes for a browser to send a request and receive a response back from a server. RTT is not influenced by file size or the speed of your Internet connection. Instead, it’s affected by:

Round-Trip TimePhysical Distances
Number of hopesNumber of Intermediate Nodes
Ammount of trafficAmount of Traffic
Transmission mediumsTransmission Mediums

RTT is where the battle for speed is typically won and lost, since no rendering in the user’s browser can begin before the initial outgoing request for the HTML file is returned.

Performance

One of a CDN’s main missions is to minimize latency. From an architectural standpoint, this means having to build for optimal connectivity, where PoPs are located at major networking hub intersections where data travels.

Physical facilities are another important consideration. As a rule, you always want your PoP to be in a premium data center where backbone providers peer with each other and your CDN provider has established peering agreements with other CDNs and major carriers. Such agreements enable CDNs to significantly reduce round-trip times and improve bandwidth utilization.

Reliability

CDN infrastructure scale makes a glitch-free system a statistical improbability. However, this same scale can help ensure record resilience and high-availability, enabling CDN providers to commit to 99.9% and 99.999% service level agreements (SLAs).

As a rule, commercial CDNs adopt a “no single point of failure” approach, both by carefully phasing maintenance cycles and by integrating additional hardware and software redundancy. Many also manage internal failover and disaster recovery systems that auto-route traffic around downed servers. For additional redundancy, CDN providers also deal with multiple carriers and rely on dedicated out-of-band management channels that allow them to interact with servers in case of disaster.

Scalability

Built for high-speed and high-volume routing, CDNs are expected to handle any amount of traffic. CDN architecture should address these expectations by providing ample networking and processing resources on all levels—down to computing and caching resources available on each of the caching servers.

As one would expect, CDNs offering DDoS protection services have much higher scalability requirements. To address these needs, they deploy dedicated servers built for DDoS mitigation (scrubbers). These can individually handle network-sized amounts of traffic, processing tens of gigabytes each second.

Responsiveness

With a global-sized network, CDNs continually strive to improve responsiveness—measured in the amount of time it takes for network-wide configuration changes to take effect.

Keep in mind that even small configuration changes, like an order to purge a specific image from cache or the addition of an address to a blacklisted IP list, need to be communicated across all PoPs. The larger and more geographically spread out the network, the longer it takes to accomplish this.

To ensure good quality of service to customers, the CDN should be designed with quick configuration propagation in mind. This is commonly achieved with a combination consolidate.

Inside CDN Caching Servers

The modern cache server is a state-of-art content delivery machine, with increased RAM and CPU throughput, complemented by a high-capacity solid state drives (SSDs). RAM and SSD are used to provide high-speed access to cached objects, with RAM—being the faster of the two—used to store the more frequently-used items.

While some CDNs still use electromechanical hard drives (HDD), SSDs are rapidly becoming the industry standard. CDNs are about speed, and benchmark tests show SSDs to be significantly faster—even when compared to 7200 rpm HDDs.

Speed Comparison

 

speed comparison

 

to be continued

Leave a Comment


Your email address will not be published.