CloudFront - S3 源故障转移和源响应超时

CloudFront - S3 origin failover and origin response timeout

我正在尝试将 CloudFront 分配配置为对 S3 源使用源故障转移。最初它看起来是个好主意 - 当主存储桶所在的区域关闭时,所有请求都会自动路由到故障转移存储桶。然而,在 CloudFront 文档中,我发现了以下与响应超时相关的描述:

GET and HEAD requests – If Amazon S3 doesn't respond within 30 seconds or stops responding for 30 seconds, CloudFront drops the connection and makes two additional attempts to contact the origin. If the origin doesn't reply during the third attempt, CloudFront doesn't try again until it receives another request for content on the same CloudFront origin.

For all requests, CloudFront attempts to establish a connection with S3. If the connection fails within 10 seconds, CloudFront drops the connection and makes two additional attempts to contact S3. If the origin doesn't reply during the third attempt, CloudFront doesn't try again until it receives another request for content on the same origin.

The response timeout for S3 can't be changed.

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorS3Origin.html#RequestS3RequestTimeout

如此高的响应超时以及 CloudFront 故障转移不像 Route53 健康检查那样工作的事实,即它总是尝试将流量路由到主要来源,即使之前的请求失败,提出问题 - 是 CloudFront对于整个区域可能出现故障的罕见情况,故障转移真的是切实可行的解决方案吗?看起来在那种情况下,通过 CloudFront 托管的网站的性能无论如何都会很差。我错过了什么吗?

事实上,这个响应超时是健康检查的一部分,而不是用户加载请求。如果源不健康,CloudFront 将开始将所有用户流量引导至故障转移。

因此,除了执行健康检查的 30 秒之外,对于用户来说不会有性能问题,CloudFront 实际上正在执行健康检查以了解它是否应该切换