如何预热CloudFront边缘服务器的缓存? [英] How to pre-warm CloudFront edge servers' cache?
问题描述
我们有一个要求,我们要预热特定CloudFront分发的所有边缘服务器的缓存.为此,我们将需要将一些呼叫定向到所有边缘服务器.有什么方法可以识别区域内或全局的所有边缘服务器?
We have a requirement where we want to pre-warm the cache of all the edge server for a specific CloudFront distribution. For this, we will need to direct a few calls to all the edge servers. Is there any way of identifying all edge servers within a region or globally?
例如:
浏览此处提供的信息时: http://aws.amazon.com/cloudfront/details/
When going through the information available here: http://aws.amazon.com/cloudfront/details/
我发现亚洲内部有多个边缘服务器,以孟买(印度)和香港为例,我有兴趣将一些HTTP调用定向到这些边缘服务器.我怎样才能做到这一点?如果我能获得所有这些服务器的身份,那就太好了.
I found that there are multiple edge servers within Asia, lets take Mumbai (India) and Hong Kong for example, I am interested in directing a few HTTP calls to these edge servers. How can I achieve this? If I can get the identity of all these servers, that will be great.
此外,我们最初想到的是以下方法: 在所有地区都有一个微型实例,并从这些地区访问我们的资产.
Also, we originally thought of the following approach: Have a micro instance in all the regions, and access our assets from them.
但是这种方法存在问题.从CloudFront文档中,我已经了解到边缘服务器之间没有层次结构,如果任何边缘服务器没有所需的资产,它将直接向Origin服务器索要该资产.现在,一个区域可以具有多个边缘服务器.如果在一个区域内,所有边缘服务器都没有所需的资产,那么它将无法实现此目的. 因此,我的问题是如何确保一个区域中的所有边缘服务器在其缓存中都具有必需的资产?
But there is a problem with this approach. From CloudFront documentation, I have come to understand that there is no hierarchal structure between the edge servers, if any of the edge server does not have the required asset, it directly ask Origin server for that asset. Now, a single region can have multiple edge servers. If within a region, all the edge servers are not having the required assets, then it defeats the purpose of doing this exercise. So, my question is how to ensure that all the edge servers in a region have the required assets in their cache?
请注意,内容本质上是静态的.而且,如果不可能覆盖所有边缘服务器,那么即使有一种方法可以覆盖70%的边缘服务器,我也想尝试一下.
Please note that the content is static in nature. And if covering all edge servers is not possible then even if there is an approach which can cover, lets say, 70% of the edge servers, I would like to try that.