-
Website
http://blog.kovyrin.net -
Original page
http://blog.kovyrin.net/2008/10/25/advanced-squid-caching-for-rails-applications-preface/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
for you health
3 comments · 1 points
-
jamiew
1 comment · 6 points
-
qu1j0t3
1 comment · 1 points
-
TomK32
1 comment · 1 points
-
Scoundrel
9 comments · 1 points
-
-
Popular Threads
The only thing that bothers me is that on that box I have two cores and squid uses only one of them... but so far even on one core it was just awesome (squid 3.0! 2.X versions were just awful first two days when I was setting the stuff up).
My rails app supports 304 Not Modified for a lot of key url, some of those return binary images. I want to use a server side caching proxy to keep the content - but it's important that requests still make it to the rails app for statistic collection reasons.
The rails app will reply 304 which should let the caching proxy release it's content to the client. That's at least how I think this should work. Varnish is currently disagreeing with me no matter how I setup the Cache-Control
Just to share, instead of URL rewriting, the way we approached this problem was to use Squid's X-Accelerator-Vary feature. We make the load balancer inject headers (e.g. X-User-Type) and make the page return the appropriate X-Accelerator-Vary headers. Squid then selects an appropriate version of the page, matching the headers and cached copy's X-A-V fields.