Skip to main content

Join GoRails to continue learning

Subscribe to GoRails to get access to this episode and all other pro episodes, and access to our private Slack community of Ruby and Rails devs.

Subscribe to watch

Login to your account

Rails Performance Techniques:

Amazon Cloudfront CDN for Rails Asset Pipeline & Webpacker


Episode 301 · June 25, 2019

A CDN can distribute assets globally and allow more parallel downloads. This equates to performance benefits for users anywhere in the world

Performance Webpacker


# config/environments/production.rb
  config.action_controller.asset_host = ""

  # Optional, must use if you're serving from something other than, ::, or localhost
  config.hosts << ""

Earn a free month


Subscribe to the newsletter

Join 31,353+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.