ActiveStorage + CDN ? (recommended but we need further info)
In the documentation it says:
"For production, we strongly recommend using a CDN for serving files. Active Storage processes images through Rails which can add unncessary load to your Rails application and slow down your app if you don't have a CDN in production."
Is there any more information on setting this up? I didn't see any videos about setting up a CDN on gorails.com.
I found this thread on gorails.com: https://gorails.com/forum/how-can-i-setup-cloudfront-cdn-for-rails-app
But this was for rails 4 and before ActiveStorage (and webpacker).
Curious if there are any best practices today.
"For production, we strongly recommend using a CDN for serving files. Active Storage processes images through Rails which can add unncessary load to your Rails application and slow down your app if you don't have a CDN in production."
Is there any more information on setting this up? I didn't see any videos about setting up a CDN on gorails.com.
I found this thread on gorails.com: https://gorails.com/forum/how-can-i-setup-cloudfront-cdn-for-rails-app
But this was for rails 4 and before ActiveStorage (and webpacker).
Curious if there are any best practices today.
thanks for the fast turnaround on this !
Chris Oliver
https://gorails.com/episodes/amazon-cloudfront-cdn-for-rails-assets
https://gorails.com/episodes/amazon-cloudfront-cdn-for-rails-assets
I tried implementing some stuff around it and it didn't work. There are a couple PRs on Rails working on this to keep an eye on:
https://github.com/rails/rails/pull/34581
https://github.com/rails/rails/pull/34477
Once these are done, we can probably backport them to Rails 6 if we want.
https://github.com/rails/rails/pull/34581
https://github.com/rails/rails/pull/34477
Once these are done, we can probably backport them to Rails 6 if we want.
+1 this
I see this is due to be native in Rails 6.1.0: https://github.com/rails/rails/pull/34477
An option I'm considering for now is to create your own ActiveStorage service, essentially a wrapper of the existing S3 one. Blog article: https://vitobotta.com/2019/11/17/rails-active-storage-permanent-urls-digital-ocean-spaces-cloudflare/
I see this is due to be native in Rails 6.1.0: https://github.com/rails/rails/pull/34477
An option I'm considering for now is to create your own ActiveStorage service, essentially a wrapper of the existing S3 one. Blog article: https://vitobotta.com/2019/11/17/rails-active-storage-permanent-urls-digital-ocean-spaces-cloudflare/
I've been looking into what to do about a CDN with Jumpstart as well as organizing files within folders on s3. Any update on either would be awesome. I think I remember hearing something about updating jumpstart to the latest version of something. If I remember right, it was going to be a big bump.
Slack conversation about this topic
Folder with active storage · Issue #32790 · rails/rails
Allow configure services for individual attachments by DmitryTsepelev · Pull Request #34935 · rails/rails
Slack conversation about this topic
Folder with active storage · Issue #32790 · rails/rails
Allow configure services for individual attachments by DmitryTsepelev · Pull Request #34935 · rails/rails
Notifications
You’re not receiving notifications from this thread.