Web Performance — Serving the web at light-speed

Romain Dorgueil
Frontend Weekly
Published in
2 min readSep 6, 2016

Everyone loves speed, right?

TL;DR… Jump to the content now!

In this 3 articles serie, I’ll show how to use a few tools and techniques to optimize your website for load speed.

We will only focus on universal web performance techniques, that you can use whatever language/framework you’re using, as long as it serves HTTP, and on techniques that wont need any (or only very tiny) adjustments to your code base.

Here is our target architecture:

our target architecture

Cool! Let’s get started…

Need more? Here are the tools we’ll use…

  • nginx to serve HTTP(s) content; already using it? you can just tune your current instance’s configuration;
  • ngx_pagespeed to optimize the html, scripts, css and images; lots of possible options, we’ll use reasonable defaults, it’s up to you to chose the best deal by reading the (fucking) docs.
  • amazon cloudfront as a geo-cdn, a content delivery network that will take into account your visitors geolocation to serve assets from an edge location closer from him than your backend servers; it is also used to serve assets from a separate, cookie-less, domain, an usefull feature to circumvent the simultaneous-download-per-host browser limits; of course, this only apply if you’re using HTTP or regular HTTPS, and is nulled if you’re using SPDY or HTTP2;
  • docker (optional) to run the various services in isolated linux containers.

Now go ahead and read how to set this up…

Woot! Wasn’t that fast?

and don’t forget to share the love!

--

--