CODE

Content delivery network (CDN)

A content delivery network or CDN is a network of geographically located servers used to deliver media content. These servers enable faster loading times when a user accesses content through the internet. In short, a CDN is a group of servers that speeds up the loading time for data-heavy applications.

How does a CDN work?

When a user accesses media content over the internet for the first time in their geographical region, it will take more time to load as this request is sent to where the media is stored (the origin server). Once that user has made the request in their region, a copy of this media will be stored on a proxy server which is closer geographically than the origin server – also referred to as “edge caching”.

CDNs make it possible to speed up loading time significantly, which is one of the reasons that most videos don’t require buffering when watching over the internet anymore. Making high-quality video stream delivery possible.

Edge caching

Edge caching is the use of proxy servers within a CDN to store content closer to the end user. The benefit of this is that it improves the end user's loading time for web content. For instance, when you play the latest season of a series on a streaming service and the episode loads instantly without buffering, this is thanks to the content being stored on a proxy server near you.

CDN cache hit and miss

When an end-user visits a website or attempts to stream content that isn’t readily available on a proxy server, the request is sent back to the origin server where the content was originally stored, referred to as a “cache miss”. This usually happens for content that isn’t popular in that region, meaning that may be the first time it’s been requested.

On the other hand, when an end-user visits a website or streams content that is available on a proxy server, this is called a “cache hit”. The request is fulfilled by the proxy server and doesn’t need to be sent back to the origin server, resulting in improved load time for the user.

CDN cache HIT ratio  

The cache hit ratio is a measurement of a CDN’s performance. This is measuring the proportion of requests to a CDN’s servers which result in a “hit”. You can calculate this with a simple equation:  

Cache hits / Total cache requests = Cache hit ratio  

It’s important to aim for a high hit ratio as this means there are fewer requests going back to the origin server. There are two key reasons this is important, end-users have a better experience with content that loads quickly, and it costs businesses less to deliver this content when fewer requests hit the origin server. You can find out more about saving money on CDN usage with our simple calculator for streaming services here.  

Adaptive bitrate streaming (ABR) and multi-bitrate streaming (MBR)

ABR is the video streaming technology which is used to deliver the highest possible quality of video to the end user, according to the quality of their network connection. The video player will automatically adjust the streaming quality depending on the available bandwidth and performance of the user’s device. For most video streaming services, it’s standard practice to utilise ABR in order to deliver the best possible experience for their users.

MBR is different from ABR as it offers users the choice of selecting the video quality manually. The end user can select a video quality bitrate from 144p to 1080p, manually adjusting it to suit their network bandwidth. If the user doesn’t select a bitrate which is suitable, it can result in buffering or lag which means a poorer viewing experience.  

Origin shield  

An origin shield is an additional layer of caching infrastructure which reduces the load and operating costs of an origin server. The technology helps to improve the availability of your origin server by reducing the number of requests that hit it. Achieving this is done by compiling multiple requests in the origin shield layer, and only sending a single request to the origin server.

An example of this is when a content title on a streaming service is popular in multiple regions. When content is trending, multiple users will be attempting to access it and rather than each of these requests for the same content being sent directly to the origin server, the origin shield will compile them. One request can then be sent to the origin server, and this content can then be distributed throughout the CDN to each proxy server.