Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is a pretty simple question, but one that I'm having trouble finding a good "best-practices" answer.

When using Varnish, do most small-ish sites install it side-by-side on the same server as their web-app? Or should it be installed on it's own server?

What are the benefits/ramifications of each?

share|improve this question
up vote 4 down vote accepted

It depends on the traffic you're serving and how much memory you can afford to give it. If you have a 16GB server and apache is taking up 4GB and mysql 8GB and you want to leave 2GB around for the OS/fs-cache then the question becomes "is 2GB enough for my usage of varnish".

The "best practice" is to do the math.

share|improve this answer

I run a site for a major festival that explodes three days a year.
Normally it runs on a micro instance at amazon, and a day in advance I turn it up to a large one (with 7.5gb ram) with a 2GB cache. Otherwise it's just a standard LAMP-stack.

In my experience it's no problem what so ever to run the varnish cache on the same server. In some cases it might actually give you an advantage in latency to the backend server.

This server serves during the heavy days, around 8-12 requests a second (yes, I know this isn't exactly defined as high traffic these days).

I'd say that you can easily install varnish on the same server, until you see performance trouble. When load gets too high, inject a dedicated cache server in the equation.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.