O'Reilly logo

Full Stack Web Performance by Tom Barker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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:

  • Edge caching

  • 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required