Using varnish as a cache for more than one website

Davies Matt J A (LCSS) mjdavies at glam.ac.uk
Tue Jun 29 11:56:18 CEST 2010


Hello everyone

What is the best practice way of setting up varnish to act as a cache for more than one web site?

I can see I can make multiple backend, and I've read that I can run multiple instances of varnish, I'm just wondering what is the best practice way?

One thing I can't quite get my head around is how do I tell varnish which incoming URL to serve with which backend, or instance.

Scenario

I've got our DNS boys to point a.com and b.com at our varnish server, which is going to act as a cache for both sites, both sites being very different and needing different rules.  Rules that may collide also.

If I use the multiple instance route, how do associate an instance with an incoming URL?

Also, the same applies for multiple backends in the same instance.

I'm brand new to Varnish so this is probably a remarkably stupid question, apologies for my greeness.

Matt






More information about the varnish-misc mailing list