Jump to content
Nytro

The complete guide to HTTP/2 with HAProxy and Nginx

Recommended Posts

The complete guide to HTTP/2 with HAProxy and Nginx

by Marcin Ryzycki on 14th March 2016
DEV-OPS

With the recent buzz around HTTP/2 and its benefits, it is time to upgrade the infrastructure. This article shows how to install and configure HAProxy (with SSL termination) with Nginx. To ease the process even more, I supply you with ready to use Docker images.

HTTP-2-optimised.jpg

TL;DR

Skip to Configuration section if you want to skip installation process and you are only interested in configuration details.

Why should I care about HTTP/2?

There are already many articles out there about HTTP/2 and its benefits - and I encourage you to read them. I'll focus on points which are most important from my point of view.

Key benefits of HTTP/2:

  • It is binary (not textual like HTTP/1.1) and uses header compression. No more worries about header and cookies size.
  • Is fully multiplexed, can use one connection for parallelism. Your site performs much better in case it includes plenty of resources (fonts, CSS, JS, image files) because now they are all loaded in single TCP connection, in a non-blocking manner. Domain sharding and asset concatenation becomes an anti-pattern. In short: your website loads much faster.
  • It allows the server to push responses proactively into client caches (no support for that feature in Nginx yet).
  • It uses the new ALPN extension which allows for faster-encrypted connection. The encryption protocol is determined during initial connection.

 

Articol complet: http://m12.io/blog/http-2-with-haproxy-and-nginx-guide

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...