Hi Per, Thank-you for your help? With a minor change, your configuration worked extremely well - is there a wiki for Varnish that I can post it? I've written out a full, working, configuration for a two-host director below which might be of use in the VCL examples page.
Another question - is there an easy way to monitor the average pageload time that varnish experiences when contacting the backends? Many thanks for your help, Alex -- backend wwxx { .host = "xx.xx.xx.xx"; .port = "80"; .probe = { .url = "/"; .timeout = 34 ms; .interval = 1s; .window = 10; .threshold = 8; } } backend wwxx { .host = "xx.xx.xx.xx"; .port = "80"; .probe = { .url = "/"; .timeout = 34 ms; .interval = 1s; .window = 10; .threshold = 8; } } director director random { { .backend = wwxx; .weight = 100; } { .backend = wwxx; .weight = 100; } } sub vcl_recv { if (req.http.host ~ "^(www.)?mysite.com$") { set req.backend = director; } } On Thu, Dec 11, 2008 at 6:03 PM, Per Buer <pe...@linpro.no> wrote: > Hi Alex, > > Alex Davies wrote: > >> I'm figuring that I need something like >> >> # web1 >> backend default { > > backends must have uniqe names so you might use: > > backend web1 { >> .host = "xxx.xxx"; >> .port = "80"; >> .probe = { >> .url = "/"; >> .timeout = 34 ms; >> .interval = 1s; >> .window = 10; >> .threshold = 8; >> } >> } >> >> # web2 >> backend default { > > backend web2{ > >> .host = "xxx.xxx"; >> .port = "80"; >> .probe = { >> .url = "/"; >> .timeout = 34 ms; >> .interval = 1s; >> .window = 10; >> .threshold = 8; >> } >> } >> >> And then something to glue all the backends together, but I see many >> different options in the manuals! I'd appreciate a pointer in the >> right direction if anyone could spare one. The vcl man page isnt >> entirely obvious to me! > > Use a director, like this: > > director www-director round-robin { > { > .backend = web1; > .weight = 100; > } > { > .backend = web2; > .weight = 200; > } > } > > > -- > Per Buer - Leder Infrastruktur og Drift - Redpill Linpro > Telefon: 21 54 41 21 - Mobil: 958 39 117 > http://linpro.no/ | http://redpill.se/ > > > _______________________________________________ > varnish-misc mailing list > varnish-misc@projects.linpro.no > http://projects.linpro.no/mailman/listinfo/varnish-misc > > -- Alex Davies This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender immediately by e-mail and delete this e-mail permanently.
_______________________________________________ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc