O'Reilly logo

Heroku Cookbook by Mike Coutermarsh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Serving assets from Amazon Web Services (AWS) Cloudfront

We can drastically reduce the number of requests to our dynos by having all the static assets of our application served by a Content Delivery Network (CDN). Static assets are the images, CSS, and JavaScript used by our application. Using a CDN is a huge performance win for any application. It helps us by freeing up our dynos from serving static assets, and it also gets our assets to our users' machines faster.

In this recipe, you will learn how to take an existing Rails application and have its assets served by AWS Cloudfront for speedy delivery to users.

Getting ready

For this recipe, we will need an AWS CloudFront account.

Visit http://aws.amazon.com/cloudfront/ to sign up now. Alternatively, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required