- Newest
- Most votes
- Most comments
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:
- Configure your ALB with an HTTPS listener.
- Set up a single target group with your backend instances or services.
- 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
Relevant content
asked a year ago
