Chapter 2. Accomplishing Web Performance Wins via Infrastructure
When looking holistically at your stack, there are some significant wins that you can gain through your infrastructure without implementing huge architectural changes. If you are not already doing so, using a Content Delivery Network (CDN) will show immediate and significant performance improvements, just like utilizing an elastic cloud platform will allow you to scale on demand to prevent performance bottlenecks. Let’s take a look.
Using a CDN
A CDN is a globally distributed network for hosting and serving data. Although it is possible to set up your own private CDN, this requires setting up a lot of infrastructure. So, for the purposes of this book, we will discuss the commercial options available for the following:
Global traffic management
Edge Caching: Serving Your Application as Close as Possible to Your User
One of the biggest causes of latency on the server side is simply the proximity of your end users to the machines serving your application. It’s pure physics: data is transmitted as light down fiber-optic lines but, at best, data travels at two-thirds the speed of light, so the closer your visitors are to your server, the faster they receive the data. Many companies utilize multiple datacenters across the country (and around the world), so presumably, you might have content served from each coast, but what if you could serve content from the same state or even the same city? That’s the ...