Example VCL for backend check

Per Buer perbu at linpro.no
Thu Dec 11 19:03:09 CET 2008


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/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20081211/928cf16a/attachment-0003.pgp>


More information about the varnish-misc mailing list