Using varnish as a cache for more than one website

Davies Matt J A (LCSS) mjdavies at glam.ac.uk
Tue Jun 29 12:49:50 CEST 2010


Hi Martin

> Do you have separate backends for a.com and b.com  

Yes mate

> Is there no common content ?

Yes, there is no common content

> Are you planning to use 1 server for varnish ? 

Yes

> How bad is it for business when it crashes ?

If the varnish server crashes then it'll be super duper duper bad.  It won't mean losing money though or jobs to be honest, we're a college.

That is a good point though, does anyone use God or another monitoring process to make sure varnish does not go down?  Or it will restart it if it does go down.

I've posted up what I've got so far in reply to Marcus

Both of you, thanks for you help, it's really appreciated.

Currently, 1978 requests per second with varnish on a medium load, 25 without varnish, same load :-)

Matt


On 29 Jun 2010, at 11:11, Martin Boer wrote:

> Matt,
> 
> It isn't a remarkably stupid question but there are a remarkably lot of options and reasons why to choose one path over another.
> 
> Do you have separate backends for a.com and b.com ? Is there no common content ?
> Are you planning to use 1 server for varnish ? How bad is it for business when it crashes ?
> 
> Regards,
> Martin
> 
> 
> Davies Matt J A (LCSS) wrote:
>> 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
>> 
>> 
>> 
>> _______________________________________________
>> varnish-misc mailing list
>> varnish-misc at varnish-cache.org
>> http://lists.varnish-cache.org/mailman/listinfo/varnish-misc
>> 
>> 
>>  
> 





More information about the varnish-misc mailing list