Skip to content

Is it possible for alb listener to support both http2 and http1.1 ?

0

I want to create a ALB(Application Load balancer) listener rule that enable both http2 and http1.1 so that a client not able to use http2 can access to our site with http1.1.

So I created two target groups.(one is http1.1and the other is http2) When I tried to attach them to a listener, error like below pop up . Are there any way to do that?

Enter image description here

1 Answer
0
Accepted Answer

Unfortunately, it is not possible to configure a single Application Load Balancer (ALB) listener to support both HTTP/2 and HTTP/1.1 simultaneously in the way you've described. The error message you're seeing is because ALB does not allow mixing of HTTP/2 and HTTP/1.1 target groups within the same listener.

However, you don't need to create separate target groups for HTTP/2 and HTTP/1.1. ALB automatically handles protocol negotiation between clients and targets. When you configure an HTTPS listener on your ALB, it automatically supports both HTTP/2 and HTTP/1.1 on the front-end (client-facing side).

Here's how it works:

  1. Configure your ALB with an HTTPS listener.
  2. Set up a single target group with your backend instances or services.
  3. The ALB will automatically negotiate the appropriate protocol (HTTP/2 or HTTP/1.1) with each client based on their capabilities.

Clients that support HTTP/2 will use it, while those that don't will fall back to HTTP/1.1 automatically. This happens without any additional configuration on your part.

On the backend, the ALB communicates with your targets using HTTP/1.1 by default, regardless of the protocol used between the client and the ALB. If you want to use HTTP/2 to your backends, you would need to enable end-to-end HTTP/2 support, but this is a separate consideration from supporting both protocols on the client-side.

In summary, you don't need to create separate target groups or listeners for HTTP/2 and HTTP/1.1. A single HTTPS listener on your ALB will handle both protocols automatically on the client-side, ensuring compatibility with both HTTP/2-capable and HTTP/1.1-only clients.
Sources
Introducing mTLS for Application Load Balancer | Networking & Content Delivery
Resolve HTTP connection errors with Application Load Balancer | AWS re:Post

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.