Performance Improvement via Proxies

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
realEuph's picture

As mentioned in a previous post, I am having performance issues with a site I manage, One person has (forcibly) suggested using Squid as a reverse-proxy to improve performance. I have not heard that discussed in any Drupal meeting. I hear Varnish.

I have researched the web on both proxies and have found a lot of useful information, but (at least so far) not answers to these questions.

  • Does anyone have experience with both?
  • Are there any specific recommendations or concerns with using either?

Thanks,

Leonard Daly

Comments

Varnish is newer and vetted for Drupal

Chris Charlton's picture

Varnish is newer and vetted for Drupal; there are tons of articles/code widely available for Varnish configurations. I doubt there's the same for Squid because there just hasn't been as much effort in that area from the Drupal community.

Chris Charlton, Author & Drupal Community Leader, Enterprise Level Consultant

I teach you how to build Drupal Themes http://tinyurl.com/theme-drupal and provide add-on software at http://xtnd.us

I've used both (though to be

BTMash's picture

I've used both (though to be fair, I used squid over 4 years ago and set up my last site with varnish a few months ago so YMMV). Squid is very fast and handles massive concurrency better. Varnish is faster but can falter under really large concurrent payloads (we're talking millions of concurrent users, btw. With smaller numbers of concurrent users, varnish is faster). However, technical stuff aside, some of the big things I would say varnish has going for it over squid would be that varnish are:

a) There is a lot more documentation
b) It is easier to set up and configure

One could say (a) implies (b) but no, varnish really does win on both of these points. Squid is faster than Varnish under certain circumstances (and Varnish is faster in others). Squid also has built-in capabilities to handle SSL (Varnish does not). BUT, Varnish is widely well documented (which I would say is always a leg up). There is lots of documentation on how to handle SSL with varnish and nginx/apache/stunnel/etc. Lots.

Finally, as Chris mentioned, Varnish is one of those projects most of the Drupal community strongly supports (and in a community as big as drupal, getting the kind of support that varnish is actually quite rare). It means you'll be much better off working with it and knowing you can get help with it than if you decided to instead go with Squid).

I would suggest looking at Lullabot's configuration for varnish which is at https://github.com/Lullabot/varnish.
Also suggested reading (since its from the team at Digital Ocean): https://www.digitalocean.com/community/tutorials/how-to-configure-varnis...