I am changing CDNs and I would like to preload some content to AWS Cloud Front so that my origin server is not hammered during that transition. Any tips?
1 Answer
Create your CloudFront distribution and...
- make CloudFront the CDN in a randomly selected 1% of pageviews
- write a script to request all commonly used image paths from the CloudFront distribution at whatever pace you prefer
-
1Do you know of any CDNs that allow you to "preload" content by uploading it somewhere?– cklibornNov 20, 2011 at 23:16
-
Anything that isn't "origin-pull" essentially works that way. It removes the big benefit of origin-pull, though, which is that if you forget to put a file on the CDN it isn't a problem, the CDN just pulls it off your server. You could do this with CloudFront by switching to an S3 bucket backed distribution instead of a custom origin.– ceejayozNov 21, 2011 at 2:41
-
The first option described is really the only way to go, as the second option would only prime the cache in one Amazon edge location. Nov 22, 2011 at 16:15
-