Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does HTTP/2 need to be implemented end-to-end to be useful?

Tags:

http2

How much of the performance benefit of HTTP/2 is lost if only the client <-> load balancer is HTTP/2 and the actual web server isn't? I'm guessing it depends on the latency and bandwidth between the load balancer and the server, but if you had to guesstimate for the average case, would it matter at all?


1 Answers

There are two major things that you will get if you implement HTTP/2 end-to-end.

The first is that your load balancer does not need to perform any parsing and reframing from HTTP/2 to HTTP/1.1 and viceversa. This accounts for latency and CPU usage on the load balancer, as well as resources such as file descriptors (which must be employed in larger quantities for HTTP/1.1).

The second is that you will lose one of the most important features of HTTP/2: HTTP/2 Push. Servers are able to push associated resources to clients, but only when HTTP/2 is used end-to-end. HTTP/2 Push is in my experience the most important feature that you want to turn on in order to reduce page rendering times, and therefore improve user experience, which ultimately brings more business (as demonstrated by several studies).

I am the HTTP/2 maintainer for Jetty, and I gave a session at a conference showing the benefits of HTTP/2 Push, you can watch the relevant part here (or watch the whole session :)

There are a lot of similar examples online that show the benefit of HTTP/2 Push: for example here and here.

In summary, the "performance" of a website when it is end-to-end on HTTP/2 should improve depending on the particular case. The improvements may be small (e.g. for REST sites or text-based websites) up to huge (image-based websites or websites with lots of resources per page).

like image 50
sbordet Avatar answered Nov 17 '25 22:11

sbordet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!