On Oct 29, 10:34 am, Nick Quaranto <
n...@quaran.to> wrote:
> Thanks Trevor. Is the time to get files up on Cloudfront take any longer
> than S3? That's my primary concern with switching to it. Currently the gems
> are uploaded to S3 when you do `gem push` and then gem indexing is kicked
> off in the background, and that usually takes around a minute to rebuild.
In my experience, using Cloudfront can simply be thought of as a
"faster way to access files on S3" -- files you put on S3 are
immediately accessible on Cloudfront in an invisible way. I believe
there can be a small lag while an asset is copied from S3 to a
Cloudfront edge network for an initial request, but subsequent
requests should be much faster.
To your question (I think) it appears that there can be a delay in
updating the edge servers, but it's supposedly very short. You can
read the part about Eventual Consistency here:
http://docs.amazonwebservices.com/AmazonCloudFront/2009-04-02/GettingStartedGuide/
So, it looks like Cloudfront might serve a "stale" version of a gem
for longer than S3 would. Do gems get new file names with new
versions, though? If so, I think that'd sidestep this potential
problem. If not, then I suppose you'd just have to decide if the
supposed speed gains of using Cloudfront would outweigh the chance of
serving stale gems for longer.
There's more details about how it works in general here:
http://aws.amazon.com/cloudfront/#details
No problem at all if you want to table this until after the
transition, but I'm happy to help if you're interested in
investigating this more.
- Trevor