Squid setup and configuration for a high-load environment
Sunday, February 01st, 2009 | Author: Ozzik

Hello again,
I know I don’t write much, but that’s just my lack of time. But hey, I’m trying. Anyway, today I wanna tell you about setting up a squid server for a high-load environment (hey, just like the title suggests :) ) First, a little background.
squid
Squid a caching proxy server which can be configured to work in different environments. It can be a forwarding proxy, an internet transparent gateway for access control purposes and my favorite - a reverse proxy, i.e. website accelerator.

I won’t tell you much regarding the first two(serving the same purpose, really), as I never really had to deal with those kind of environments. And even if I’d decide to, AFAIK there is a problem working in a multi-WAN configuration, which is exactly what I need. But I did study a lot regarding the third option - a website accelerator.

Not to say that I’ve found the perfect configuration, but for our purposes it seems pretty decent. A very big problem with squid is that it has very few guides on the net. It does have a configuration guide on its website and some FAQ and other stuff, but I guess what is really needed is some examples of a known configuration working in a high-load environment. Surprisingly, a lot of people asking about this kind of things, use very weak hardware, like PIII servers and such. And while I understand that it serves their needs pretty well, that doesn’t help me to understand the real abilities and limitations of this software. What is even less helping is that the developers themselves don’t know those things - not to blame them in any way, because, as they say, every setup is pretty unique and there’s no real way to know this without trying out different options.

Anyway, for some time our company used an old obsolete version of squid (2.5 stable9), on a now also obsolete Debian sarge. It did serve the purposes pretty well, until the website started to grow and instead of finding out the flaws of the current setup, they started buying more and more servers, while cloning the hard drives with the existing configuration of the squid. To be fair, the IBM x335 servers they bought on the ebay did cost no more than $500 each, so it wasn’t so bad after all. But hey, that’s not a real solution, is it?

So when I came on board I decided that it was time to cut down on the number of servers (about 20 at that time) and optimize the whole system. There’s really a lot to tell regarding the system setup itself, but I guess I’ll leave it for next time. Right now I think I’m going to concentrate on squid itself. The biggest help was this guide, so you might want to take a look at that too, and although 90% of this guy’s suggestions were adopted by me, you should read it, because he mentions a lot of things he tried on the way, until finding the best solutions. It might spare you some pain.

I’m used to working with Ubuntu Server Edition and this is what I’m using here too. Please note that I’ll post the version numbers too, but if by the time you’re reading there is a newer version, you might consider replacing “mine” with a new one. Also, just to spare you from asking the obvious question: why did I use squid 2.7 stable5 and not the 3.0 or 3.1 branch - it’s because by this time a lot of important features were not yet ported to the new versions. Including basic support for HTTP/1.1 and other necessary things for a reverse proxy setup. Plus the 2.7 stable 5 works really good, so…

OK, let’s go.

VN:F [1.9.6_1107]
Rating: 3.5/10 (2 votes cast)
VN:F [1.9.6_1107]
Rating: +1 (from 1 vote)
Squid setup and configuration for a high-load environment, 3.5 out of 10 based on 2 ratings

Pages: 1 2 3 4 5