Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTTP/2 pushes on AWS API Gateway + Lambda

Is it possible to run HTTP/2 pushes with aws-serverless-express?

As far as I know, AWS API gateway supports HTTP/2 (verified with https://tools.keycdn.com/http2-test). Unfortunately, I can't find any example of HTTP/2 pushes under node.js app deployed on lambda.

The only example which I found is Node.js app which supports HTTP/2:
https://github.com/azat-co/http2-node-server-push

Any tips? Solutions? Is it even possible?

like image 856
Maciej Treder Avatar asked Jun 22 '17 18:06

Maciej Treder


People also ask

Does AWS Lambda support HTTP2?

The lambda endpoints appear to support HTTP/2 (see aws/aws-sdk-js#2300), and it would be nice if the AWS v3 SDK actually sent HTTP/2 requests that the lambda service accepted.

Does AWS Lambda use HTTP?

A Lambda integration maps a path and HTTP method combination to a Lambda function. You can configure API Gateway to pass the body of the HTTP request as-is (custom integration), or to encapsulate the request body in a document that includes all of the request information including headers, resource, path, and method.

Does AWS gateway support HTTP 2?

Incoming requests to API Gateway are HTTP2 compatible, but requests from API Gateway to your Lambda function will not be HTTP2. Your function code does not need to support HTTP2.

Does API gateway support HTTP 2?

Precisely speaking, API Gateway's API “endpoint” supports HTTP/2 (meaning you can send HTTP/2 request to it) while API Gateway DataPlane does not support HTTP/2. The endpoint should be downgraded it to HTTP/1.1 to be sent to the DataPlane that is only able to send HTTP/1.1 request to the integration.


1 Answers

Incoming requests to API Gateway are HTTP2 compatible, but requests from API Gateway to your Lambda function will not be HTTP2. Your function code does not need to support HTTP2.

like image 50
jackko Avatar answered Oct 05 '22 13:10

jackko