As a web developer at Comcast, I have to take web performance seriously. Many of our applications serve millions of people living all over the United States. Some of our customers use the latest versions of browsers and operating systems. Others may still be running old versions of Internet Explorer. So we need to understand performance, load balancing, uptime, and other concepts if we want to serve all of our customers well.

I couldn’t have found a better book than Ilya Grigorik’s High Performance Browser Networking to explain the different layers between the applications we build as software engineers and the devices our users use. From the physical and data link layers all the way up to the application layer, Grigorik describes how clients and servers communicate over a variety of protocols, how users perceive performance, and how developers can optimize their work to deliver reliable, secure, and performant applications.

The book, available to read for free online, is broken up into four main sections: Networking 101, Performance of Wireless Networks, HTTP, and Browser APIs and Protocols. Some of the best chapters cover:

  • How mobile providers operate networks that handle the traffic of millions of devices across many different cells
  • The performance benefits of using HTTP/2
  • Comparisons of the XMLHttpRequest, Server-Side Event, and WebSocket protocols

The book gave me a number of performance-boosting tips I would like to implement in the projects I work on. Some of Grigorik’s suggestions include:

  • Thinking carefully about how to minimize latency through keepalives, caching, request and response multiplexing, etc.
  • Using TLS and HTTP/2 as much as possible
  • Using TCP best practices like disabling slow-start after idle, enabling window scaling, and using TCP Fast Open if available
  • Minimizing DNS lookups

There are many more tips in the chapter on optimizing application delivery. I highly recommend the book to anyone looking to learn more about web performance.