<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Homo-Adminus Blog - Latest Comments in Advanced Squid Caching for Rails Applications: Preface</title><link>http://homo-adminus.disqus.com/</link><description></description><language>en</language><lastBuildDate>Sun, 26 Oct 2008 13:56:46 -0000</lastBuildDate><item><title>Re: Advanced Squid Caching for Rails Applications: Preface</title><link>http://blog.kovyrin.net/2008/10/25/advanced-squid-caching-for-rails-applications-preface/#comment-3311715</link><description>Wow, thanks for the idea! I think I'll definitely try it here.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Scoundrel</dc:creator><pubDate>Sun, 26 Oct 2008 13:56:46 -0000</pubDate></item><item><title>Re: Advanced Squid Caching for Rails Applications: Preface</title><link>http://blog.kovyrin.net/2008/10/25/advanced-squid-caching-for-rails-applications-preface/#comment-3308810</link><description>"We’ve decided to create a nginx module that would translate the same document page URLs to a set of URLs, which would be different for all those 3 kinds of users."&lt;br&gt;&lt;br&gt;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.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">WK</dc:creator><pubDate>Sun, 26 Oct 2008 05:25:40 -0000</pubDate></item><item><title>Re: Advanced Squid Caching for Rails Applications: Preface</title><link>http://blog.kovyrin.net/2008/10/25/advanced-squid-caching-for-rails-applications-preface/#comment-3308797</link><description>Yes, this was the first thing I've tried (one of those many dead branches here). The problem was the following: we need lots of data to generate all the stuff on the page. Document info, comments, user info, owner info, stats, document security settings, bots information and much more. If we'd just take the main template and replace it with an SSI/ESI code, it wouldn't reduce load on our db machines at all and it would be painful to make all those SSI/ESI actions dependent on current user_id, bot/non-bot status, etc. And finally, we'd be forced to load those pieces of data for each small piece of html we generate for the ESI/SSI template. So, after implementing a huge part of this idea I've just stuck with a messy and weird configuration/code.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Scoundrel</dc:creator><pubDate>Sun, 26 Oct 2008 05:17:38 -0000</pubDate></item><item><title>Re: Advanced Squid Caching for Rails Applications: Preface</title><link>http://blog.kovyrin.net/2008/10/25/advanced-squid-caching-for-rails-applications-preface/#comment-3308762</link><description>Have you ever thought about splitting the page into a static,cachable part and a dynamic part, which are then merged on the frontend-Webservers using Server Side Includes?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Joerg</dc:creator><pubDate>Sun, 26 Oct 2008 05:02:45 -0000</pubDate></item><item><title>Re: Advanced Squid Caching for Rails Applications: Preface</title><link>http://blog.kovyrin.net/2008/10/25/advanced-squid-caching-for-rails-applications-preface/#comment-3308549</link><description>s/If-Not-Modified/If-None-Match/, sorry.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ryan Tomayko</dc:creator><pubDate>Sun, 26 Oct 2008 03:40:23 -0000</pubDate></item><item><title>Re: Advanced Squid Caching for Rails Applications: Preface</title><link>http://blog.kovyrin.net/2008/10/25/advanced-squid-caching-for-rails-applications-preface/#comment-3308548</link><description>From what I've been able to determine, Varnish does not support validation (If-Modified-Since, If-Not-Modified). It supports the freshness model (Expires, Cache-Control/max-age) only. I was pretty sure Varnish 2.0 was going to add support for validation but it doesn't look like it's made it in yet.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ryan Tomayko</dc:creator><pubDate>Sun, 26 Oct 2008 03:39:40 -0000</pubDate></item><item><title>Re: Advanced Squid Caching for Rails Applications: Preface</title><link>http://blog.kovyrin.net/2008/10/25/advanced-squid-caching-for-rails-applications-preface/#comment-3308408</link><description>Yes, I forgot to mention that we do hit the backend app for the same statistic reasons. We set Cache-Control header to 'public, max-age=0, must-revalidate' and this makes squid check with the backend on each request. I'll give more details in one of the following posts where I'll explain what and how we do in the application side. I think this will be the next post actually since this is what could be the most useful for others.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Scoundrel</dc:creator><pubDate>Sun, 26 Oct 2008 03:02:33 -0000</pubDate></item><item><title>Re: Advanced Squid Caching for Rails Applications: Preface</title><link>http://blog.kovyrin.net/2008/10/25/advanced-squid-caching-for-rails-applications-preface/#comment-3308245</link><description>Since we are talking about server side caching, i have a question for you: &lt;br&gt;&lt;br&gt;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. &lt;br&gt;&lt;br&gt;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</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tobias Luetke</dc:creator><pubDate>Sun, 26 Oct 2008 02:25:22 -0000</pubDate></item><item><title>Re: Advanced Squid Caching for Rails Applications: Preface</title><link>http://blog.kovyrin.net/2008/10/25/advanced-squid-caching-for-rails-applications-preface/#comment-3304886</link><description>Before choosing Squid 3.0 I've discussed this with percona guys and they shared with my some really weird stories from their experience with Varnish (constant memory leaks, crashes, etc). So, I decided to go with Squid and pretty happy about the result so far. &lt;br&gt;&lt;br&gt;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).</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Scoundrel</dc:creator><pubDate>Sat, 25 Oct 2008 21:17:17 -0000</pubDate></item><item><title>Re: Advanced Squid Caching for Rails Applications: Preface</title><link>http://blog.kovyrin.net/2008/10/25/advanced-squid-caching-for-rails-applications-preface/#comment-3304811</link><description>Alexey, you mentioned you used Squid for this, but have you tried Varnish?  After hearing good things about it I experimented with it a bit with good results.  I've not had a chance to test it with a high volume production system though and I'm curious to hear from others who have.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">dkubb</dc:creator><pubDate>Sat, 25 Oct 2008 21:08:57 -0000</pubDate></item></channel></rss>