HTTP2 does not go till the end

paul libbrecht 6 Reputation points
2022-12-15T12:44:49.327+00:00

Hello all,

I believe that there is a claim that Azure supports http/2 and indeed there is such a switch as documented here: https://azure.microsoft.com/en-us/blog/announcing-http-2-support-in-azure-app-service/

This works for the connection between browser and the azure cloud entry-point (gateway? slot? WAF? I don't know) but these are proxies and they don't use http2 as client: In our case (beta.cabri.com, a docker container running alpine linux with an NGinx), I can see that it clearly comes as http1.1. I tried to activate http2 for http:// connections on that nginx but all it made is a complete blocking. So I disabled that.
As far as I know, I cannot activate https connections between the proxy and the container.

The problem? HTTP/2 which does not manage well how the resources are delivered (e.g. "I can give you these bytes", later later) is nothing better than HTTP1.1: The whole advantages of http2 multiplexing is not here; our app server can only deliver entire blobs.

My current conclusion: Azure cloud with app services does not support http/2 fully.

I would be happy to be contradicted.

Thanks in advance.

Paul

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
717 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,096 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. paul libbrecht 6 Reputation points
    2023-02-08T13:40:53.67+00:00

    So it is sad to say... but through MS Support, it appears that this is not possible: HTTP/2 will not go till the end until either:

    • The proxy in front of app services implements an pure http/2 clientship or an https-clientship (this is the proxy as the one in front of docker, nodejs or any other, this has the setting that brtrach-MSFT mentioned)
    • NGinx implements, for http, where http2 is mostly not working, an upgrade from http11 to http2 (this trac ticket follows this; very old)

    With the MS support, which were really friendly and helpful!, we then discussed the alternatives and it appears that the only way to operate a docker-with-nginx or any other server where http2 will go till the files and till the app-server, is to use VMs. I've indeed started to go to Linux VMs and can say that I see my nginx happily do http2 (and also certbot to be working well, while it becoming more difficult for app-services).

    As usual: I lost the bells and whistles of all the tuning and security protections in favour of something I control and where I can attest of the performance ;-).

    I'll now provide this answer as an answer. Ideally I should mark it as a non-solution!

    Paul

    1 person found this answer helpful.
    0 comments No comments

  2. brtrach-MSFT 16,926 Reputation points Microsoft Employee
    2022-12-19T02:17:23.26+00:00

    @paul libbrecht We understand that you are trying to configure HTTP2 for your Azure Web Apps for Container.

    By default, yes http2 is turned off. It sounds like you were able to locate the setting to turn it on.

    The request will only be taken to the front end as http2 by default. If you wish the front end to pass the request onto the web workers as https2, you will need to enable the below setting called "HTTP 2.0 proxy." Otherwise, testing will indeed show the request coming across as http 1.2.

    271905-image.png

    Can you please attempt to use this setting to see if it helps complete the chain for HTTP 2.0? We look forward to your reply.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.