Do you know how a CDN works to speed up your site? 🚀
Hi, *|USERNAME|*!
For every millisecond of page load time we reduce to make our sites faster, there is a big increase to both how many people visit our site as well as well as how engaged they are. When it comes to increasing our site's speed and load time, we tend to (rightfully) think of optimizations we can make to our JavaScript, CSS, HTML, how external assets get loaded, the size of our content, and so on. There is one big area that also plays a big role. This area has to do with the physical connections and pathways between our web server and the visitor's device:
The greater the distance each bounce of communication has to travel, the longer it will take for our site to load. This distance is especially a problem if our site's audience is spread out across the world and we have a web server located in a single location, like the western United States as highlighted in the above image. This distance can often add multiple seconds (😱) of delay between our web server and the visitor trying to access our content. How do we solve this?
The solution lies in something known as a Content Delivery Network (or CDN). The gist of a CDN is that it is all about intelligently caching static content from our web server at locations that are physically closer to the visitor:
What this means is this: for the bulk of communication that happens between our visitor's device and our web server, that communication is now handled by the physically closer CDN servers (known as edge servers). My latest article What is a CDN? goes into greater detail about what a CDN is and introduces the crazy concept of all this by comparing network routing with pizza delivery. This article also shares how a CDN has benefited KIRUPA.com over the years as well. If you've been curious to know more about what CDNs are, I encourage you to take a look and share it with any friends or enemies who might share your curiosity.
TILL NEXT TIME!
Writing about some of the more basic concepts behind web development that doesn't actually involve code (like DNS servers, the internet itself, CDNs, and so on) is something that you'll see more of in the upcoming series of tutorials that I write. I would love to hear from you on basic topics that you would like to see, and I'll do my best to accommodate them. Don't be shy! The easiest way to contact me is via Twitter or by posting on the forums (they are still cool!)
Cheers,
Kirupa 😃