Content Delivery Networks
Content Delivery Networks
Located throughout the world and geographically closer to your users, nodes ensure a faster response and download time of content due to reduced latency.
According to LoadStorm:
- 25% of users will abandon a website that takes longer than four seconds to load.
- 74% of users will leave a mobile site that takes longer than five seconds to load.
- 46% of users won’t return to a poorly performing website.
The solution is as simple as using a content delivery network (CDN).
What is a CDN?
A CDN is a way to deliver content from your website or mobile application to people more quickly and efficiently, based on their geographic location.
A network of servers (“points of presence,” or POPs) in locations worldwide is what makes up a CDN.
The Content Delivery Network server closest to a user is known as the “edge server”. When people request content from a website served through a CDN, they’re connected to the closest edge server, ensuring the best online experience possible.
Imagine that you’re in Brisbane, Australia, and you’ve requested an image on a server in London, almost 17,000 km away.
It would typically take around 300 milliseconds to send the request and receive the response.
If you were to request the same image from a server in Sydney, which is less than 1000 km from Brisbane, it would take about 10 milliseconds to send the request and get the response.
That’s 30 times better than the first case, but because we’re speaking in milliseconds, the difference might be imperceptible.
However, when considering a webpage may contain more than 2 Megabytes of information spread across 30 requests, the difference certainly matters.
One needs to understand browsers make only small numbers of concurrent requests. Each request may involve several round-trips to the server. Consequently, the milliseconds add up to many seconds, making the website slow.
How do CDNs Work?
To avoid the dissatisfied users created by slow service, Content Delivery Networks move content closer to the user to reduce latency and improve the user experience.
In theory, this is neat, elegant, and self-explanatory. But, in practice, there are some pretty gnarly technical challenges.
First, to reduce the latency for any particular user, a Content Delivery Network must have a content caching server – a cache that’s close to them.
Unfortunately, it’s not feasible to have a nearby cache for every possible internet user.
Instead, caches are organised into PoPs, distributed throughout large geographic regions (Europe, US, Asia, etc.). Then the PoPs are placed in major population centres within those regions.
Next, given a request by a single user, a CDN must direct it to the closest PoP.
Most Content Delivery Networks do this by leveraging a technology called GeoIP. Think of GeoIP as a large lookup table that maps IP addresses to geographic regions.
When a request is processed, a Content Delivery Network will reference the table and direct the user’s traffic to the closest available server. Easy.
Caching content to a CDN
If you use a CDN, it means that if someone tries to access content from your website or mobile app, then that person’s request for content only needs to travel to a nearby POP and back.
One can think of a cache as a sizeable key-value store. When a request comes in, it’s the cache’s job to determine what the user is requesting, locate the data, and send it back to the user.
And, Another Thing
Caches employ multi-level lookup tables that use optimised algorithms to find the correct content in the shortest amount of time.
CDNs also purge (remove and update) content constantly so that the most current, relevant content is delivered. Also known as content invalidation, purging allows businesses to update content when necessary.
Who Benefits from using a CDN?
If you have a website or mobile application and serve information to multiple users worldwide, you will benefit greatly.
CDNs are especially useful to large, complex websites with users spread across the globe and websites or mobile apps with dynamic content.
Some of the benefits Content Delivery Networks can provide your website include:
- Faster load times for web and mobile users
- Quickly scalable during times of heavy traffic
- Minimises risk of traffic spikes at point of origin, ensuring site stability
- Decreases infrastructure costs due to traffic offloading
- Better site performance
Content Delivery Networks also offer many specific benefits to different types of businesses and organisations, such as:
- E-commerce. A Content Delivery Network helps e-commerce sites deliver content quickly and efficiently, even during times of heavy traffic, like Black Friday and the holidays.
- Government. Large, content-heavy websites can deliver vital information to citizens much more quickly and efficiently by using a CDN.
- Finance. CDNs provide banking institutions with a fast, secure, and reliable infrastructure to deliver sensitive data to consumers and analysts.
- Media / Publishing. Media websites need to deliver timely and up-to-date information. A Content Delivery Network can help media companies update headlines, and news homepages as stories unfold in real-time and remove data as it becomes outdated.
- Mobile apps. A CDN delivers dynamic location-based content for mobile apps, reducing load times and increasing responsiveness.
- Technology and SaaS. A CDN helps technology websites serve billions of requests a day to web users without decreasing performance.
If you think I might be able to help with your project, get in touch.