Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS ELB/ALB http/2 pass thru to EC2 instance via http/2 (not http/1.1)

AWS ELB/ALB now supports HTTP/2.

According to the documentation (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html):

Application Load Balancers provide native support for HTTP/2 with HTTPS listeners. You can send up to 128 requests in parallel using one HTTP/2 connection. The load balancer converts these to individual HTTP/1.1 requests and distributes them across the healthy targets in the target group.

My target is an EC2 instance running Apache with HTTP/2 support. Is it possible to have the ALB connect to the target (EC2 instance) via HTTP/2 and avoid having ALB <--> ec2 connections be via HTTP/1.1?

I did not see any way to do this in the console or documentation.

like image 770
Konstantin Avatar asked Oct 27 '18 01:10

Konstantin


People also ask

Does AWS ELB support HTTP 2?

It supports both HTTP/1.1 and HTTP/2. It's forwarding all traffic over port 443 to the EC2 instances in a private subnet. The EC2 instances are responsible for the TLS termination. Apache on the EC2 instances supports HTTP/1.1 and HTTP/2.

Is HTTP 2 supported on an application load balancer?

To make it easier to use gRPC with your applications, Application Load Balancer (ALB) now supports HTTP/2 end-to-end, enabling you to publish gRPC services alongside non-gRPC services via a single load balancer.

Does AWS ELB support HTTP?

Unlike a Classic Load Balancer or an Application Load Balancer, a Network Load Balancer can't have application layer (layer 7) HTTP or HTTPS listeners. It only supports transport layer (layer 4) TCP listeners. HTTP and HTTPS traffic can be routed to your environment over TCP.

Can we use a single ELB for handling HTTP and HTTPS requests?

Q: Can I use a single Application Load Balancer for handling HTTP and HTTPS requests? A: Yes, you can add listeners for HTTP port 80 and HTTPS port 443 to a single Application Load Balancer.


1 Answers

No, this isn't possible.

ALB always converts the requests to HTTP/1.1 and this is not a configurable option.

like image 173
Michael - sqlbot Avatar answered Sep 27 '22 17:09

Michael - sqlbot