Using a persistent HTTP connection between the server and the browser speeds up additional requests, as there's no extra handshaking required. Especially over more latent connections, this can increase the overall performance. If NGINX is being used as a reverse proxy (as detailed in Chapter 7, Reverse Proxy), it's also important to ensure that these connections have keepalive enabled to ensure high throughput while minimizing latency. The following diagram highlights both areas where the keepalive packets are important to maintain high performance:
This persistent connection remains established using Keep Alive packets, so that the connections remain open for minutes rather than closing once they are complete. This reuse can be immediate for additional CSS/JS files or as further pages and resources are requested.
While some of the client...