multiple domains in one backend & 2 varnish servers

Andreas Kaiser - Atela CC andreas at
Tue Apr 21 12:46:15 CEST 2009


I'm testing varnish 2.0.4 for a project and struggling trough the 
documentation. In my scenario I have a backend server "cms-server" with 
multiple domains/sites (for example, ...) and 2 
varnish server (one in Europe and one in USA). Because some domains 
should be served by Europe server and others by the usa server I think I 
need to configure each varnish install with a specific vcl config file. 
What I don't have clear is if I need to use as backend only the IP of 
the CMS server or multiple backends for every domain, also all domains 
would have the same configuration related with cookies, compression, etc:

backend cmsserver{
.host = "";
.port = "80";

My experience with varnish is related with one webserver with one domain 
that also has varnish installed... If I'm not wrong, varnish would 
create a cache for each hostname/domain but I'm lost how varnish and 
cmsserver should be configured for showing the specific content for each 
domain if the servers are different ones...

The reason of this configuration is that the cms-server will be only 
accessible from a private network and the 2 varnish server (which will 
be used as public frontend servers) Would varnish be a good choice in 
this situation?

Thanks in advance...

More information about the varnish-misc mailing list