gpt4 book ai didi

amazon-web-services - AWS CloudFront : how requests are redirected the Edge locations

转载 作者:行者123 更新时间:2023-12-03 19:35:51 24 4
gpt4 key购买 nike

我阅读了许多关于 CloudFront 和边缘位置的文章。

我无法理解用户的请求是如何自动路由到他最近的边缘位置的?
有人能解释一下当客户端请求静态资源时会发生什么吗?网络组件(ISP、AWS 等)的名称是什么?

问候。

最佳答案

来自 AWS 文档 ( https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CloudFrontRegionaledgecaches.html?shortFooter=true )

When a viewer makes a request by your website or application, DNS routes the request to the CloudFront edge location that can best serve the user’s request. This location is typically the nearest CloudFront edge location in terms of latency



“延迟”是指从 CloudFront 边缘站点获取请求和从 CloudFront 边缘站点获取请求所需的时间。它与“带宽”不同,它更像是一种 react 时间

有关 AWS 如何监控延迟的详细信息,请参阅 Route53 文档

如果边缘位置没有请求的特定项目,则它将查询近邻...

If the files are in the cache, CloudFront returns them to the user. If the files are not in the cache, the edge servers go to the nearest Regional Edge Cache to fetch the object. In the Regional Edge Cache location, CloudFront again checks its cache for the requested files.



如果这不起作用,则从“原始服务器”请求文件,原始服务器是包含站点主副本的原始 Web 服务器或 S3 存储桶。

更新:只是添加@michael-sqlbot 在下面所说的内容。最终用户的 Cloudfront 访问是通过“分发域名”进行的。这是“abc123.mycloudfront.net”形式的域名。此名称必须在 Route53 中。可以使用来自您自己的 DNS 注册域的 CNAME 间接指向此名称

@michael-sqlbot的话查询“分发域名”时

the DNS query results in the browser receiving an answer including IP addresses that are selected in order to route the request to the CloudFront edge location that can best serve the user’s request.



换个角度说,全世界都在使用同一个“分发域名”。但是在不同的位置,这映射到不同的 IP 地址。 IP 地址“通常”是延迟测量中最近的地址,但据推测,并不能绝对保证是这种情况

关于amazon-web-services - AWS CloudFront : how requests are redirected the Edge locations,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49338622/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com