내용으로 건너뛰기

Cloudfront: How to push files to the regional servers

0

I am in charge of the archi software site https://goto.archi and using the AWS Cloudfront service with all regions. The technology we use on the origin server will generate dynamic paths for the static files every time we deploy. We are noticing that the cloudfront CDN can require for many files up to 4000ms to deliver that static content. Consequantly we see in the google search console that our page renders in more than 2.5s. We wonder therefore if it is possible to push the static content to the regional servers every time we do a deployment.

질문됨 4년 전1.4천회 조회

1개 답변
0

This is known as "cache pre-warming." Without significant additional information, it's difficult to recommend the best approach for you. However, I doubt that trying to pre-warm the cache will solve the problem. You would need to know where the majority of your users are in order to pre-warm the correct layers of cache. You also run the risk of objects aging out of cache before a user makes a request.

You might find that Origin Shield provides a better experience, if your users are highly globally distributed.

If you haven't already, I recommend reading this blog post which discusses caching strategy, including pre-warming and Origin Shield. It is targeted toward Gaming customers, but is equally relevant to your use case.

If your static content doesn't change between deployments, I strongly suggest that you try to (a) use an S3 bucket to store and serve the static content, and (b) don't change URIs unless the content also changes.

Finally, you may wish to review the docs on optimizing caching.

AWS
전문가

답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

관련 콘텐츠