Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

🏠 Back to Blog

Chapter 13

The physical properties of the communication channel set hard performance limits on every application. Speed of light and distance between client and server dictate the propagation latency, and the choice of medium (wired vs. wireless) determines the processing, transmission, queueing, and other delays incurred by each data packet. In fact, the performance of most web apps is limited by latency, not by bandwidth. While bandwidth speeds continue to increase, the same cannot be said for latency. As a result, while we cannot make the bits travel any faster, it is crucial that we apply all the possible optimizations at the transport and application layers to eliminate unnecessary round trips, requests, and minimize the distance traveled by each packet.

  • Latency is the bottleneck, and the fastest bits are bits not sent.

Caching resources on the client

  • The cache-control header can specify the cache lifetime of a resource
  • The last-modified and ETag headers provide validation mechanisms for cached resources
  • You need to specify both the cache-control and last-modified headers. You cannot use one OR the other.

Optimizing for HTTP 2.0

At a minimum:

  1. Server should start with a TCP CWND of 10 segments
  2. Server should support TLS with ALPN negotiation
  3. Server should support TLS connection reuse to minimize handshake latency