- Newest
- Most votes
- Most comments
Just a thought, but is it possible to increase the origin timeout in CloudFront. When you configure the ALB endpoint as an origin, check the advanced settings and notice that there is a time. By default I believe it is 30 seconds, but it can be increased to 60, and beyond with a quota increase request.
https://aws.amazon.com/premiumsupport/knowledge-center/cloudfront-custom-origin-response/ https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginResponseTimeout
Thanks! I have tried that up to the 60 seconds without a quota increase, but it didn't work. I checked the link for getting the quota increase and cannot see Cloudfront in the list of available services. Besides, I would need a timeout over 75 seconds since that is how long the response from ALB takes. And ultimately I need to understand why it would take 75 seconds -- the goal is sub-second latency which should be achievable with this setup, especially when its not under any kind of load.
I suggest to enable Server-Timing header and check cdn-upstream-connect and cdn-upstream-fbl metrics to see which one causing the added latency. In addition, ALB access logs can help to verify whether the request is delayed by ALB processing or by response from the target
Relevant content
- asked 4 months ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a month ago
I chatted with support and we found the issue. I had accidentally configured one of the ALB subnets to private when they both needed to be public. Problem solved!