Book Review: High Performance Browser Networking by Ilya Grigorik; O'Reilly
As a web developer with a keen interest in (desktop & mobile) browsers and web performance, I enjoyed reading this book High Performance Browser Networking by networking guru, Ilya Grigorik and picked numerous practical tips that I can put to work. I had several "aha!" moments while reading it.
I first heard about the draft version of this book on Twitter and browsed through many of the chapters. Not surprisingly, I read high recommendations for the book from Web Performance guru Steve Souders and the creator of Fiddler, Eric Lawrence - folks passionate about the Web and browsers, whom I follow on Twitter. I grabbed the Kindle version of the book when I noticed it in the list of available books offered by the O'Reilly Blogger Review Program.
This book explains in plain-English, the hows and whys of networking topics related to browsers. The author doesn't just have a deep knowledge of browsers he is also good at presenting it in an engaging manner with real-life examples ("Netflix encodes each & every steam in over 120 different versions to adjust for the varying screen sizes and available bandwidth bitrates."). The book is full of interesting facts and advice on how you can apply this knowledge to improve web applications. Here is a sampling:
- Latency (the time from the source sending a packet to the destination receiving it), not bandwidth (maximum throughput of a logical or physical communication path) is the performance bottleneck for most websites. Beyond a point, more bandwidth doesn't matter (much).
- Polling is exceptionally expensive on mobile networks; minimize it. Where possible, push delivery and notifications should be used. Outbound and inbound requests should be coalesced and aggregated.
- The radio is one of the most power-hungry components of any handset - second only to the screen
- Piggyback your background pings, and pay close attention to the network access patterns of third-party libraries and snippets in your code
- Your mobile application must be robust in the face of common networking failures: unreachable hosts, sudden drops in throughput or increases in latency or outright lost of connectivity.
- Every optimization that we apply for wireless networks will translate to a better experience in all other contexts.
- Plan for high latencies.
- Any existing website or application can and will be delivered over HTTP 2.0 without modification
- Different browsers implement different logic for when, and in which order, the individual resource requests are dispatched. As a result, the performance of the application will vary from browser to browser
If you are a web developer or an architect, you must read this book or at least the online draft version to know how you can build/optimize modern web applications and prepare yourself for the Web of the future.