Prevent Varnish from caching Drupal RSS feed

After posting about Cloudflare, I realized that Feedburner wasn’t updating with the new post, even after pinging and re-syncing. Watching log files as I was testing the validator, I realized Varnish was serving a cached version of rss.xml. Inserting the following code in /etc/varnish/default.vcl resolved the issue:

// Skip the Varnish cache for rss feed
if (req.url ~ "rss\.xml") {
    return (pass);
}

Hope it helps!

Cloudflare for much improved response times

As I noted in my last post I recently switched from from a Varnish/Apache/Wordpress configuration to a Varnish/Nginx/Drupal. Before that I was also using Cloudflare to service as a CDN/additional layer of cache. I turned off Cloudflare while I was working on the new setup, making sure everything was working before turning it back on. And the results were pretty drastic:

Response time for Blog: 07/24/2011 - 07/31/2011

You can see the response time climb up until around the 29th – which is the date I turned cloudflare back on. Best of all, Cloudflare is totally free, although you can pay for more features if you’d like. I would definitely recommend it it, checkout the features here.

New Site

I was finding a lot of odd… quirks with WordPress, so I decided to switch over to Drupal. At the same time, I modified from varnish connecting back to an apache backend to connecting back to an nginx backend – and I dropped to a 1.7 second load time, even with disqus enabled. That’s insane. If you want more specific details on the setup, leave me a comment. I’ll post it all here at some point.