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.

asked 2 years ago598 views
1 Answer
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
EXPERT
Paul_L
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions