High Performance Browser Networking

Read in Feb 2019
Book by Ilya Grigorik published in 2013

I try my best to write a short summary/review of the books I read, and this is one of them. I typically publish them on Goodreads, but also sync them to here.

Most comprehensive overview of web performance I've seen. Book talks about Internet connectivity; fiber speeds and how LTE works. Configuring your edge; TLS version, HTTP2, and TCP tuning, and, how to structure your assets for performance. It doesn't go into server-side response time, databases, and so on, since that's highly specific to your stack. It goes in depth with what's constant between web application. I'd consider this necessary reading for those who are working on web performance, to consider the full picture when looking at performance, not just server response time.

Favorite things I learned: One of the major battery drainers on a mobile device is the radio that we use for LTE/4G/3G. Phones will usually turn this off after a few seconds of inactivity (think, like a car that turns off its engine when stopped at a light). The cell tower will maintain its TCP sessions, so pushing is effective—however, if you have a polling loop that sends a request just after the interval at which the radio turns off, you've got a terrible, terrible battery-draining software cocktail in play. Ouch.

TCP will go back to slow-start (i.e. slow down) after a few seconds of inactivity (because TCP was designed for constant streams of data, not sprints, which is what HTTP is for). `tcp_slow_start_after_idle` disables this. If you have a website that's over 15kib (how much data you can transfer in the slow-start congestion window), that's bad news for you. Definitely bad news on a CDN.

For 5 stars, I would've liked to have seen more performance studies. How do performant applications differ? Why is it so important? We know it boosts conversion, but what are other examples? I was hoping to find a chapter on that in the book, but no dice. I'd also have like to seen a chapter on how to prevent performance regressions. This is a tricky thing to build in a fashion that'll age well and not be flaky.