Re: dynamic content with cloudfront and rails?
With a pull based CDN (like cloudfront/cdn_sumo) only the very first request from must go to the "origin" to grab the asset. After that, all requests will be served from the closest geographical CDN location. Are you trying to optimize that first cache-miss request? It looks like you could set up your DNS to use Amazon's Route 53 and then set up GEO DNS configuration http://www.cyberciti.biz/cloud-computing/aws/route-53-geodns-tutorial/ as one option. I've not done this though, and would be interested if anyone else has set up a GEO based DNS configuration. Would be cool to do this with a Heroku US and EU region. -- Richard Schneeman On Mon, Sep 23, 2013 at 9:29 AM, Mike Atlas wrote: > Hi guys > > We're currently using SumoCDN (which leverages Amazon Cloudfront) to serve > up our static assets successfully. > > However, I'm now curious about serving up our dynamic GET requests as well > through Cloudfront, since our users may be geographically dispersed and > possibly quite far from the east coast server our Rails application > ("origin") is living on currently. > > Does anyone have experience setting up rails to leverage dynamic request > CDNs on rails (heroku) or a blog post? I couldn't find much out there > beyond people discussing how to use the static content caching feature. > > Thanks > Mike > > -- > -- > You received this message because you are subscribed to the Google > Groups "Heroku" group. > > To unsubscribe from this group, send email to > heroku+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/heroku?hl=en_US?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "Heroku Community" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to heroku+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- You received this message because you are subscribed to the Google Groups "Heroku" group. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/heroku?hl=en_US?hl=en --- You received this message because you are subscribed to the Google Groups "Heroku Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to heroku+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: dynamic content with cloudfront and rails?
Right - I would move off SumoCDN and just use Cloudfront directly for static assets, but then go further by serving up dynamic GET requests for requests with query parameters. I should have included these in the original message: http://media.amazonwebservices.com/blog/cloudfront_dynamic_web_sites_full_1.jpg http://aws.amazon.com/cloudfront/dynamic-content/ On Monday, September 23, 2013 10:45:36 AM UTC-4, richard schneeman wrote: > > With a pull based CDN (like cloudfront/cdn_sumo) only the very first > request from must go to the "origin" to grab the asset. After that, all > requests will be served from the closest geographical CDN location. Are you > trying to optimize that first cache-miss request? > > It looks like you could set up your DNS to use Amazon's Route 53 and then > set up GEO DNS configuration > http://www.cyberciti.biz/cloud-computing/aws/route-53-geodns-tutorial/ as > one option. I've not done this though, and would be interested if anyone > else has set up a GEO based DNS configuration. Would be cool to do this > with a Heroku US and EU region. > > -- > Richard Schneeman > > > On Mon, Sep 23, 2013 at 9:29 AM, Mike Atlas > > wrote: > >> Hi guys >> >> We're currently using SumoCDN (which leverages Amazon Cloudfront) to >> serve up our static assets successfully. >> >> However, I'm now curious about serving up our dynamic GET requests as >> well through Cloudfront, since our users may be geographically dispersed >> and possibly quite far from the east coast server our Rails application >> ("origin") is living on currently. >> >> Does anyone have experience setting up rails to leverage dynamic request >> CDNs on rails (heroku) or a blog post? I couldn't find much out there >> beyond people discussing how to use the static content caching feature. >> >> Thanks >> Mike >> >> -- >> -- >> You received this message because you are subscribed to the Google >> Groups "Heroku" group. >> >> To unsubscribe from this group, send email to >> heroku+un...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/heroku?hl=en_US?hl=en >> >> --- >> You received this message because you are subscribed to the Google Groups >> "Heroku Community" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to heroku+un...@googlegroups.com . >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- -- You received this message because you are subscribed to the Google Groups "Heroku" group. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/heroku?hl=en_US?hl=en --- You received this message because you are subscribed to the Google Groups "Heroku Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to heroku+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
dynamic content with cloudfront and rails?
Hi guys We're currently using SumoCDN (which leverages Amazon Cloudfront) to serve up our static assets successfully. However, I'm now curious about serving up our dynamic GET requests as well through Cloudfront, since our users may be geographically dispersed and possibly quite far from the east coast server our Rails application ("origin") is living on currently. Does anyone have experience setting up rails to leverage dynamic request CDNs on rails (heroku) or a blog post? I couldn't find much out there beyond people discussing how to use the static content caching feature. Thanks Mike -- -- You received this message because you are subscribed to the Google Groups "Heroku" group. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/heroku?hl=en_US?hl=en --- You received this message because you are subscribed to the Google Groups "Heroku Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to heroku+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Cloudfront
I used the free account on cloudflare, and had good results. Also used unicorn with 4 workers on heroku On Wed, Apr 4, 2012 at 9:41 PM, Arun Thampi wrote: > We use Cloudfront's Custom Origin Server to point to our Rails app instead > of an S3 bucket. This removes the need to sync assets to an S3 bucket. We > used Open Government's tutorial [1] as a base and built upon it to improve > it slightly [2]. > > [1] > http://blog.opengovernment.org/2011/02/10/cloudfront-s3-rails-and-jammit-on-apache/ > > [2] > http://dev.anideo.com/2012/01/03/how-we-setup-amazon-cloudfront-to-play-nice-with-rails.html > > > On Thu, Apr 5, 2012 at 10:37 AM, Peter Keen wrote: > >> I use asset_sync[1] on the one project where I push stuff to >> S3/cloudfront. It works great and is basically automatic. >> >> [1]: https://github.com/rumblelabs/asset_sync >> >> On Wed, Apr 4, 2012 at 7:21 PM, railsnerd wrote: >> > Hi there >> > >> > My site has a lot of static pages, and I'm hoping I can use Cloudfront >> > to host them and stop requests hitting Heroku. >> > >> > (Yes I know there are other possibilities like memcached and varnish) >> > >> > Does anyone know of a good guide in setting this up? It's not very >> > clear to me. >> > >> > thanks >> > >> > -- >> > You received this message because you are subscribed to the Google >> Groups "Heroku" group. >> > To post to this group, send email to heroku@googlegroups.com. >> > To unsubscribe from this group, send email to >> heroku+unsubscr...@googlegroups.com. >> > For more options, visit this group at >> http://groups.google.com/group/heroku?hl=en. >> > >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Heroku" group. >> To post to this group, send email to heroku@googlegroups.com. >> To unsubscribe from this group, send email to >> heroku+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/heroku?hl=en. >> >> > > > -- > It's better to be a pirate than join the Navy - Steve Jobs > http://mclov.in | @iamclovin > > -- > You received this message because you are subscribed to the Google Groups > "Heroku" group. > To post to this group, send email to heroku@googlegroups.com. > To unsubscribe from this group, send email to > heroku+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/heroku?hl=en. > -- Thanks, -John -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: Cloudfront
We use Cloudfront's Custom Origin Server to point to our Rails app instead of an S3 bucket. This removes the need to sync assets to an S3 bucket. We used Open Government's tutorial [1] as a base and built upon it to improve it slightly [2]. [1] http://blog.opengovernment.org/2011/02/10/cloudfront-s3-rails-and-jammit-on-apache/ [2] http://dev.anideo.com/2012/01/03/how-we-setup-amazon-cloudfront-to-play-nice-with-rails.html On Thu, Apr 5, 2012 at 10:37 AM, Peter Keen wrote: > I use asset_sync[1] on the one project where I push stuff to > S3/cloudfront. It works great and is basically automatic. > > [1]: https://github.com/rumblelabs/asset_sync > > On Wed, Apr 4, 2012 at 7:21 PM, railsnerd wrote: > > Hi there > > > > My site has a lot of static pages, and I'm hoping I can use Cloudfront > > to host them and stop requests hitting Heroku. > > > > (Yes I know there are other possibilities like memcached and varnish) > > > > Does anyone know of a good guide in setting this up? It's not very > > clear to me. > > > > thanks > > > > -- > > You received this message because you are subscribed to the Google > Groups "Heroku" group. > > To post to this group, send email to heroku@googlegroups.com. > > To unsubscribe from this group, send email to > heroku+unsubscr...@googlegroups.com. > > For more options, visit this group at > http://groups.google.com/group/heroku?hl=en. > > > > -- > You received this message because you are subscribed to the Google Groups > "Heroku" group. > To post to this group, send email to heroku@googlegroups.com. > To unsubscribe from this group, send email to > heroku+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/heroku?hl=en. > > -- It's better to be a pirate than join the Navy - Steve Jobs http://mclov.in | @iamclovin -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: Cloudfront
I use asset_sync[1] on the one project where I push stuff to S3/cloudfront. It works great and is basically automatic. [1]: https://github.com/rumblelabs/asset_sync On Wed, Apr 4, 2012 at 7:21 PM, railsnerd wrote: > Hi there > > My site has a lot of static pages, and I'm hoping I can use Cloudfront > to host them and stop requests hitting Heroku. > > (Yes I know there are other possibilities like memcached and varnish) > > Does anyone know of a good guide in setting this up? It's not very > clear to me. > > thanks > > -- > You received this message because you are subscribed to the Google Groups > "Heroku" group. > To post to this group, send email to heroku@googlegroups.com. > To unsubscribe from this group, send email to > heroku+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/heroku?hl=en. > -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Cloudfront
Hi there My site has a lot of static pages, and I'm hoping I can use Cloudfront to host them and stop requests hitting Heroku. (Yes I know there are other possibilities like memcached and varnish) Does anyone know of a good guide in setting this up? It's not very clear to me. thanks -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: Amazon CloudFront issues HTTP/1.0 requests, which Heroku doesn't gzip?
The nginx docs here note that gzip_http_version defaults to 1.1: http://wiki.nginx.org/HttpGzipModule#gzip_http_version Which might explain the behavior on Heroku. And this blog post mentions nginx config for using CloudFront, specifically setting gzip_http_version to 1.0: http://www.nomitor.com/blog/2010/11/10/gzip-support-for-amazon-web-services-cloudfront/ Rob On Apr 27, 4:27 am, Rob wrote: > It seems like Heroku's nginx may be set to issue a gzipped response > only for HTTP/1.1 requests. In my quick tests, a 1.0 request with an > "Accept-Encoding: deflate, gzip" header gets an uncompressed response, > but the same request under 1.1 gets gzipped content. > > Unfortunately, Amazon CloudFront, which otherwise functions nicely as > an origin-pull CDN, always issues 1.0 requests, which may explain why > it won't seem to serve gzipped content for my Heroku app. > > Has anyone else seen the same results? > Rob -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Amazon CloudFront issues HTTP/1.0 requests, which Heroku doesn't gzip?
It seems like Heroku's nginx may be set to issue a gzipped response only for HTTP/1.1 requests. In my quick tests, a 1.0 request with an "Accept-Encoding: deflate, gzip" header gets an uncompressed response, but the same request under 1.1 gets gzipped content. Unfortunately, Amazon CloudFront, which otherwise functions nicely as an origin-pull CDN, always issues 1.0 requests, which may explain why it won't seem to serve gzipped content for my Heroku app. Has anyone else seen the same results? Rob -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.