By using AWS re:Post, you agree to the Terms of Use
/Why is Cloudfront using https (http over tls) to origin instead of http2 ?/

Why is Cloudfront using https (http over tls) to origin instead of http2 ?


I have enabled http2 on cloudfront and alb.Below is an access log from alb.

https 2022-04-14T12:07:34.438950Z app/awseb-AWSEB-@#$$$$$$$/33c31cf831229bd5 0.001 0.059 0.000 200 200 1091 15561 "GET HTTP/1.1" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.80 Safari/537.36" ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 arn:aws:elasticloadbalancing:us-east-1:123456789:targetgroup/awseb-AWSEB-CO4F476RJ4O0/e54f61d50c1c75c9 "Root=1-62580e86-1411f5a823d9bc5f7dc1df7e" "" "session-reused" 0 2022-04-14T12:07:34.378000Z "forward" "-" "-" "" "200" "-" "-"

As you can see cloudfront is using https i.e http over tls instead of http2.
What could be the issue ?

1 Answers
Accepted Answer

Kindly note that CloudFront is currently not supporting HTTP/2 towards origins. The connection from CloudFront back to your origin server is still made using HTTP/1.1:

New – HTTP/2 Support for Amazon CloudFront - HTTP version -

answered a month ago
  • Ohh, okk.
    Hence was debugging an issue wherein our ttfb(time to first byte) is high when cloudfront is used compared to serving from alb directly.I asked a separate question here

  • If cloudfront supports http2 to origin, I think it helps a lot given cloudfront is at edge locations and a new connection to the origin server for most of the viewer requests increases latency.

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.

Guidelines for Answering Questions