Tarek Chaaban, M.Sc's official blog. It contains current web project portfolio, posts regarding his Canadian army experience, news, sports articles, and web tutorials on programming and using social networking technologies.

Load Balancing Varnish

Varnish is an HTTP accelerator designed for content-heavy dynamic web sites. In contrast to other HTTP accelerators, many of which began life as client-side proxies or origin servers, Varnish was designed from the ground up as an HTTP accelerator. The Varnish web site claims that Varnish is ten to twenty times faster than the popular Squid cache on the same hardware.

Anyway , at my work i have to deal with varnish so i made few test and results were amazing (especially when you use jmeter) .

Varnish only works on Linux boxes , i have Ubuntu on one of my laptops and when i did the download i got the 1.0 version (the newest varnish version being 2.0.2)

so i had to manually do it on my ubuntu .

How to install varnish on ubuntu

if you want the old varnish version : just type in the command line : sudo apt-get install varnish

if you want the new varnish version :

Download the varnish .tar.gz from sourceforge

unzip it

using the command line go to the folder where you unzipped your files

type :

1- sudo ./configure
2- sudo make
3- sudo make install

that’s it !

Now you are ready to run the latest version of varnish !! cool eh ?

Next step is how to use Varnish … there is a difference between using the old and new varnish version .

In the old varnish you only had to write varnish start and the HTTP Accelerator would star and to stop it (varnish stop)