What is a CDN?
A content delivery network, commonly referred to as CDN, is a network of edge servers strategically placed across the globe with the purpose of delivering digital content to users as fast as possible. When a user makes a request, it is routed to the nearest CDN edge server, which significantly reduces the latency. A CDN allows all users, no matter the geographical location, to have fast loading content for an unquestionably improved experience.
How does CDN work?
A CDN does not necessarily have a system of physical servers. It is often implemented by connecting and organizing different servers to each other. This is done by cache and memory systems which are linked by routers. Typically, CDN management software is used to identify the nearest server and then deliver the content. Since a copy of the content is stored on all servers in the system, the data with the least latency to the user is forwarded.
First, the location where a query came from is established and then the most appropriate server is determined. That server responds to the HTTP request and sends a response in the form of an HTTP status code; only then does the actual content follow in the form of an HTML document. An average request contains approximately 20 such question-answer sequences and does not take more than 3 seconds on average.
- Edge Distribution: Used in small CDNs. Data is transferred from a root server to the edge devices (edge nodes of a network) or directly to the point of presence (PoP, user’s Internet access device) to be able to retrieve it rapidly.
- Edge hierarchy (border hierarchy): Is used for medium-sized CDNs. Hub caches are installed downstream from the root server which distribute the data from a request to the nearby servers.
- Hub and spoke (hub and spoke): Is only used for large networks. The data of the root server is mirrored on all connected servers, called hubs. A cache system (the spoke) makes the data readily available on all servers when it is requested.
CDN Architecture
The most basic function of content delivery network architecture is its capabilities with caching, or the storing of data for future use. In the regular web browsing scene, when a website visitor wishes to see the website, the browser will send a request to the website’s server. The request is then granted, and the data will travel back to the user. This may sound simple, but there are a lot of troubles when it comes to this setup, such as latency problems due to distance and bandwidth differences. But CDN architecture can remedy this. CDN providers will program your website to be hosted by a certain point-of-presence, and this POP will cache all the data needed by website visitors within that area. These visitors will be directed to the closest POP, and data will be delivered as if the user is requesting for it from the home server. This is effective data delivery, thanks to strategic location planning of CDN providers, and high-tech CDN architecture.
Why to use CDN?
- Fault tolerant: Intelligent failover provides uninterrupted service even if one or more of the CDN servers go offline due to hardware malfunction; the failover can redistribute the traffic to the other operational servers.
- Highly Available: CDNs dynamically distribute assets to the strategically placed core, fallback, and edge servers. CDNs can give more control of asset delivery and network load. They can optimize capacity per customer, provide views of real-time load and statistics, reveal which assets are popular, show active regions and report exact viewing details to customers. CDNs can thus offer 100% availability, even with large power, network or hardware outages.
- Recoverable: Repaired parts can restart themselves and rejoin the framework, after the reason for disappointment has been fixed.
- Consistent: As a result of, strategically placed servers which form the backbone of the network the companies can have an increase in capacity and number of concurrent users that they can handle. Essentially, the content is spread out across several servers, as opposed to offloading them onto one large server thus making the sites to be accessible consistently.
- Scalable: Effortlessly Scale-Offloading traffic to a CDN will make it easier to manage traffic spikes and scale up or down within a short amount of time. This will result in less load on an origin server and help minimize any downtime. Since a typical website is comprised of approximately 80% static content, a significant portion of web assets will be delivered faster and more efficiently from a CDN.
- Performance: Increased performance is by far one of the most important benefits from implementing a CDN. Content is cached in POPs all around the world bringing content closer to the user. The shorter distance will not only reduce latency but also minimize packet loss. If users from all around the world are going to be accessing a resource, the use of a CDN is essential. Upon performing various tests in many geographical locations, we have seen a CDN reduce website latency by 83% on average compared to websites without a CDN.
- Secure: Enhance security. CDNs employ analytics and automation tools that can uncover distributed denial of service (DDoS) attacks, man-in-the-middle attacks, and other common attacks on web sites.
Types of contents
When analyzing the global population internet usage, the types of content that consumes the most bandwidth are image, video, and audio files. However, there are many other types of content that a CDN can deliver. The supported content type and formats will vary for each CDN provider but here are some common supported formats:
- Image: PNG, JPG, SVG, GIF, and TIF
- Video: FLV, HSL, MP4, MOV, and WMV
- Audio: MP3, WAV, AIFF, AAC, and PCM
- Other: CSS, JS, JSON, HTML, PDF, ZIP, TTF, OTF,and WOFF
Who uses CDN?
Pretty much everyone. 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:
- Advertising
- Media and entertainment
- Online gaming
- E-commerce
- Mobile
- Health care
- Higher Education
- Government