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?
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With