Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
HTTP caching for Goliath API on Heroku
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Bjørn Arild Mæland  
View profile  
 More options Feb 18 2012, 4:29 am
From: Bjørn Arild Mæland <bjorn.mael...@gmail.com>
Date: Sat, 18 Feb 2012 01:29:28 -0800 (PST)
Local: Sat, Feb 18 2012 4:29 am
Subject: HTTP caching for Goliath API on Heroku

I'm wondering if it's possible to add HTTP caching for a Goliath API on the
Heroku Cedar stack. Is rack-cache compatible with Goliath and em-memcached,
or is there some other alternative (except running a reverse proxy, which
you can't do on Cedar)?

Thanks,
Bjørn Arild Mæland


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ilya Grigorik  
View profile  
 More options Feb 19 2012, 6:16 pm
From: Ilya Grigorik <igrigo...@gmail.com>
Date: Sun, 19 Feb 2012 15:16:52 -0800 (PST)
Local: Sun, Feb 19 2012 6:16 pm
Subject: Re: HTTP caching for Goliath API on Heroku

Hey Bjorn. Yes you can get rack-cache to work (just need to wrap it to make
it async friendly). Having said that, on heroku you're much better off
making use of their Varnish
cache: http://devcenter.heroku.com/articles/http-caching

Simply emit the right headers and the rest is taken care of for you.

ig


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joshua Warchol  
View profile  
 More options Feb 19 2012, 7:10 pm
From: Joshua Warchol <jos...@unwin.org>
Date: Sun, 19 Feb 2012 19:10:04 -0500
Local: Sun, Feb 19 2012 7:10 pm
Subject: Re: [goliath] Re: HTTP caching for Goliath API on Heroku
Heroku cedar, which is the stack for Goliath, doesn't use Varnish, FYI.

Sent from my iPhone

On Feb 19, 2012, at 6:16 PM, Ilya Grigorik <igrigo...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bjørn Arild Mæland  
View profile  
 More options Feb 20 2012, 4:55 am
From: Bjørn Arild Mæland <bjorn.mael...@gmail.com>
Date: Mon, 20 Feb 2012 01:55:29 -0800 (PST)
Local: Mon, Feb 20 2012 4:55 am
Subject: Re: [goliath] Re: HTTP caching for Goliath API on Heroku

Correct, Varnish isn't available on Cedar unfortunately. I haven't found
many examples on using rack-cache in an async-friendly way, do you know if
this monkeypatch is still required: https://gist.github.com/743620 ?

Bjørn


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ilya Grigorik  
View profile  
 More options Feb 21 2012, 12:20 pm
From: Ilya Grigorik <igrigo...@gmail.com>
Date: Tue, 21 Feb 2012 09:20:39 -0800 (PST)
Local: Tues, Feb 21 2012 12:20 pm
Subject: Re: [goliath] Re: HTTP caching for Goliath API on Heroku

Try it - that's the only way to find out :-)

Wasn't aware of the varnish gotcha with Cedar.. Do you guys know why it's
not available?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joshua Warchol  
View profile  
 More options Feb 21 2012, 1:41 pm
From: Joshua Warchol <jos...@unwin.org>
Date: Tue, 21 Feb 2012 13:41:05 -0500
Local: Tues, Feb 21 2012 1:41 pm
Subject: Re: [goliath] Re: HTTP caching for Goliath API on Heroku
It has something to do with "advanced HTTP uses" in the new stack.
Perhaps functions that Varnish did not support, such as long-polling,
chunked replies, something like that. The cedar stack has a less
complex inbound request route in order to allow more flexibility in
the dyno layer. But that means no varnish, no nginx. Win some, lose
some I guess.

I'm surprised nobody offers an "Add-On" to Heroku for Varnish.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
steakknife  
View profile  
 More options Apr 3 2012, 10:23 am
From: steakknife <barry.all...@gmail.com>
Date: Tue, 3 Apr 2012 07:23:46 -0700 (PDT)
Local: Tues, Apr 3 2012 10:23 am
Subject: Re: [goliath] Re: HTTP caching for Goliath API on Heroku

fastly <http://www.fastly.com/> offers varnish-as-a-service.
 Coincidentally, it's run by Artur.

The main gotcha with Varnish is that, by default, it does not cache
anything with cookies.  Consequently, it takes app knowledge to cache and
invalidate more areas of a site (i.e., profile pages<http://highscalability.com/blog/2011/2/28/a-practical-guide-to-varnis...>
 or login pages<http://highervisibilitywebsites.com/example-varnish-vcl-drupal-pressf...>).
 With memcache farther down <http://rtomayko.github.com/rack-cache/storage>
 the stack<https://devcenter.heroku.com/articles/building-a-rails-3-application-...>,
often there is still load from rendering<http://rubyworks.github.com/malt//> views,
i.e., rendering those all those mustache templates<http://handlebarsjs.com/>
.

A lesser gotcha is streaming spontaneous content (i.e., in-app IM push over
WebSockets), which doesn't make sense for caching anyhow<https://devcenter.heroku.com/articles/http-routing>
.

The ability to customize VCL, specify which pages to cache / never cache
and an invalidation <http://blog.feryn.eu/2010/11/varnish-cache-purging/> API
are the *crucial <https://twitter.com/#!/crucially>* bits. ; )

Ideally though, render views client-side as much as possible in JS from
static cached assets on a CDN and make cheap API calls with Goliath.

Perhaps place Varnish in front of Goliath, which has precedent<http://blog.dloh.org/2011/01/varnish-cache-riak.html> in
non-CDN use-cases.  Request pipelining seems to be the big one.  [Table of
varnish features] <https://www.varnish-cache.org/trac/wiki/HTTPFeatures>

Barry


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »