In the fight for faster website content deliverability and reduced TTL (time-to-load), two players have risen to the top:
Cloud computing and CDNs.
For the layman, these two terms are understandably vague.
What is a CDN? What is cloud computing? And, how will choosing one over the other affect your business?
Let’s take a closer look:
What is a CDN?
CDN stands for content delivery network. As the name implies, CDNs almost always entail multiple computers spread all over the globe to deliver you the content that you need. To gain a comprehensive understanding of what CDNs are, let’s consider the average website, how it works and why CDNs are necessary.
When you first open your browser to search for a website, a lot of things happen in the background. Let’s focus on how an actual website reaches your end-user device; whether it be mobile, tablet or PC.
The simplest kind of website consists of just a server and a client.
The client is the website that requests the content, and the server responds with a list of, say, the noisiest whales in the world.
Let’s step the complexity of our website up a bit.
This time, let’s consider a media-heavy website like Instagram – we’ll call it Bananagram. Ours is a site that delivers the most exquisitely-produced videos and pictures of bananas from Madagascar. When a visitor gets to our exclusive website, it takes quite a while to load.
After numerous complaints and fewer returning visitors, we investigate and realize our photos tend to be incredibly large and take long to load. The longest period of time is taken to retrieve the photos from the database, we realize.
We have two options: reduce the size of the photos or reduce the time the photos take to be delivered by somehow cutting down our reliance on the database. This is where the beauty of a CDN is on full display.
A CDN is a network of interconnected computers that sit between our server and the browser. Its job is to store all the information that was previously requested, freeing our server from excess load.
For example, let’s say you want to see videos of how those bananas manage to be of such high quality. Here, the browser doesn’t communicate to our server directly. The request passes through the CDN; then, the CDN talks to the server. The server will then return a response to the CDN server, which stores the information on its own. When someone requests the same information again, the CDN server just returns the response it had previously stored. This process is referred to as ‘caching.’ You should be able to guess that this will be a lot quicker.
The ‘network’ in CDN refers to the fact that there isn’t just one computer, but hundreds all over the globe. When a person makes a request, the one closest to them will respond, in order to reduce latency.
What is cloud computing?
Cloud computing has become pervasive thanks to faster internet speeds and rapidly improving computer architecture. It can be defined simply as the delivery of computer services over the internet. This includes servers, databases, software, networking and intelligence.
Since its conception, many have touted cloud computing as nothing more than a buzzword penned by sly marketers. However, its impact has been so significant, it literally defines the modern internet as we know it.
To paint a picture of what cloud computing really is, let’s go back to the early 2000s; a time when every company worth its salt had its own server farm. Back then, even relatively simple websites needed to be hosted at home, using a relatively cheap server.
Owning your server and multi-purposing it is referred to as ‘on-premises’ hosting. This method began fading away during the late 2000s when companies like Amazon began offering their own servers to host on. This eliminated the nuisance of having to manage a server farm.
The main problem with having your own server farm is the fact that your systems are going to be sitting idle for a large percentage of the time they run. Unless you have a large number of users, you will accumulate electricity costs on those servers.
But cloud computing goes beyond just hosting websites. A good example would be to consider a data science application that needs to scrape data and store it. The storage bit has to happen in a database, but databases also need to be hosted somewhere.
Of course, you could always go the tried and tested route of having your own server at home. Alternatively, you could rely on a cloud provider like Microsoft to do the heavy lifting for you.
Cloud computing also entails elements such as hosted artificial intelligence, private and hosted servers, and, most importantly, virtualization.
Which one is better? Cloud computing vs. CDN
This would be a difficult question to answer on the best of days because it depends on your business requirements.
Consider the common scenario where a startup has grown far faster than it expected to. In this event, it has to scale.
It needs to:
- Progress from relying a single server to multiple ones, in order to distribute the workload
- Have an additional server that handles the database exclusively
- Upgrade the amount of memory on every individual server
- Increase the amount of RAM on the servers
- Replace the current CPU with something more powerful
Imagine the amount of work and resources that would be drained into this, in the event in which a person or small company maintains its own servers.
Cloud computing takes away the need for all this by letting you upgrade for a fraction of the cost you would incur if you were to do it on your own. Scaling is both easy and cheap, and you have tons of client providers to choose from if you’re dissatisfied.
But for most businesses? A CDN is perfect.
CDNs don’t necessarily serve the same purpose as cloud computers. They are more specialized and can only be used for the ‘delivery’ bit. The thing is, however, most companies already have a host for their content, and only rely on a server to deliver their content. For sites that deal with a lot of static content, a CDN will be worth its weight in gold.
Image delivery, for one, will be greatly improved by adopting a CDN. This increases time-to-load (TTL) and can help immensely with SEO. Aside from caching, image delivery is also made faster via image compression.