addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwchatcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgoogleimageimagesinstagramlinklocation-pinmagnifying-glassmailminusmoremuplabelShape 3 + Rectangle 1outlookpersonplusprice-ribbonImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruseryahoo

Re: [ruby-81] solution for putting assets on Amazon Cloudfront

From: user 8.
Sent on: Thursday, March 4, 2010 1:49 PM
I don't have a great solution for you, but I do have a word of warning. The thing to really look out for is the expiration/versioning. ?Query params are ignored by cloudfront, so the usual mtime solutions won't work. ?You have to put the version info in the URL, anticipate inconsistencies or have a fast expires time. ?

The assets that I've deployed in this fashion were relatively large and few in number (assets for a Unity3D game that were pulled in as-needed to keep initial load time slow..) ?So we had "extra" considerations -- did NOT want to bust cache for all assets on every deploy. ?So, I ended up building some custom memcache-enabled tracking of asset urls.. pretty crappy solution unless you need it. ?Easier would be to have your deploy script upload your assets' with keys prepended with "#{version}/", and then get this information into your rails config for your asset path. ?this will bust all your assets on every deploy, but for some that may not be a big deal.

- Aaron?

On Thu, Mar 4, 2010 at 11:26 AM, elmo <[address removed]> wrote:
Hello,

I'm running a home grown CMS on rails and I've successfully converted our S3 photo bucket into an Amazon Cloudfront CDN.? This process was easy.

I'd like to also move our other assets (css, javascript, asset images) to a S3/Cloudfront style deployment and have these be refreshed with each new release via capistrano.? Does anyone know of a clean proven technique for doing this?

I've found this discussion:

http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/affee20d11472999

As well as this link:

http://code.google.com/p/xlr8/

Which, if works as advertised, looks to be an excellent solution.? This gem seems to be a manual install process and the project looks to be dead, which makes me nervous.? Before I go down this path, I was hoping to hear of an alternate recommendation.

Thanks for your help.

Elliott





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by elmo ([address removed]) from The East Bay Ruby Meetup Group.
To learn more about elmo, visit his/her member profile
To unsubscribe or to update your mailing list settings, click here

Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy