Don't use S3 if all you're doing is serving static images from app/assets. You only need an S3-like service if you're doing user-uploaded assets. If you've just got a bunch of static images/assets, just point your CDN distribution at your Rails server. No perf hazard, way easier.
-
-
Replying to @nateberkopec
This can cause issues during deploys if new assets are being referenced by a new page, but the CDN hits an old rails backend to retrieve the asset and gets a 404
1 reply 0 retweets 1 like -
Replying to @brynary
Just have to treat asset deploys the same way you do database columns then tho. Not a big deal but definitely a gotcha.
1 reply 0 retweets 1 like -
Replying to @nateberkopec
That works for new assets but not very well for changes to e.g. JavaScript behaviors. Not sure that’s worth the hassle compared to pre-pushing assets to S3 from CI/CD
1 reply 0 retweets 0 likes -
Replying to @brynary
right. just had another think about this. if the asset has cache control headers set for more than like, 10 minutes, and you're digesting filenames, this isn't an issue right? when are people *not* doing those two things?
2 replies 0 retweets 0 likes -
Replying to @nateberkopec
It’s an issue even with long lived cache control headers and using the MD5-appended filenames. New process with new code serves a link to a new hash-appended copy of application.js. CDN hits a Rails backend which is running the old version of the code, and returns a 404
2 replies 0 retweets 1 like -
Replying to @brynary
Oh. Most people are on Heroku though and don’t have rolling restarts, everything switches at once. But I agree that would be an issue with a rolling restart.
1 reply 0 retweets 0 likes -
-
Hi welcome to my twitter account where I tweet at my customers, who are mostly on Heroku
1 reply 0 retweets 2 likes
Sorry, I didn't realize when you say "most people" that it's qualified to "who follow me on Twitter" implicitly
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.