High Performance Browser Networking

This review was originally printed in the December 2012 edition of the UKUUG newsletter, which is now defunct.

Title: High Performance Browser Networking
Authors: Ilya Grigorik
ISBN: 9781449344764

The text of this book is currently available online (legally) at: https://hpbn.co/

There are lots of simple improvements you can make to a web application to improve performance. This book attempts to cover some of the less obvious and more technical aspects which impact performance, particularly those relating to the underlying network.

Part I covers the basic elements of networking, such as the difference between latency and bandwidth, and how to measure the key indicators of performance. TCP and UDP get a chapter each, although depending on your background this will either be obvious stuff or an overwhelming amount of detail. The final chapter covers the internal workings and costs of TLS – some readers may take issue with the author’s assertion that the use of TLS imposes severe performance penalties (imperialviolet.org has some excellent posts on this specific question and browser security in general).

The second part is dedicated to wireless networks. Whilst this may be a growing area as more people move towards accessing sites through mobile devices, a lot of the issues discussed are related to the network infrastructure level, which is generally outside the control of the web developer. It is interesting from a diagnostic point of view, but less helpful with regards to mitigating the problems.

Part III covers all aspects of HTTP, including its performance implications and how these can be worked around. The chapter on HTTP 2.0 is very interesting, although with over a year remaining until the submission of the proposed standard – and longer until widespread adoption – it is perhaps a bit ahead of its time. Overall though, this is by far and away the most relevant and useful part of the book for web developers, even those running sites which do not need to scale to the size of Google or Facebook.

The final part of the book covers browser APIs and protocols. The chapter on XMLHttpRequest – which is behind most pages which update without refreshing – discusses some useful ways to fine-tune this functionality, based on techniques from sites such as Facebook. Other chapters cover technologies which have yet to receive widespread adoption, including WebSockets and WebRTC, and so may only be of interest to the specialist.

Overall, this is an extremely detailed book which covers almost every aspect of networking and browser performance. However, this breadth and depth of coverage comes at a price, and the majority of the text goes far beyond what most web developers would ever need to know. If you are working on a web application where shaving a few milliseconds off each request is essential then this book is definitely worth reading – doubly so if you have a degree of control over the physical network access – but for developers working on small scale sites only part III is particularly useful.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.