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

1

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 70.132.30.168:19320 172.31.30.35:80 0.001 0.059 0.000 200 200 1091 15561 "GET https://mywebsite.co:443/ 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" "mywebsite.co" "session-reused" 0 2022-04-14T12:07:34.378000Z "forward" "-" "-" "172.31.65.35:80" "200" "-" "-"

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

1 Antwort
1
Akzeptierte Antwort

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 - https://aws.amazon.com/blogs/aws/new-http2-support-for-cloudfront/ HTTP version - https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorCustomOrigin.html#RequestCustomHTTPVersion

beantwortet vor 2 Jahren
profile picture
EXPERTE
überprüft vor einem Monat
  • 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.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen