X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fvarnish%2Ffiles%2Fdefault.vcl;h=bff0524d7a122633cf64bd62c552654e9dfedf70;hb=b31ea650c9caecaf1fd2c5af6a47a0d340e22c5f;hp=6e87911ad61765b8bc1c282ff9c3110d7ac34554;hpb=e2f365fb8101fece9130d2a8fdcaefc1293f51bc;p=mirror%2Fdsa-puppet.git diff --git a/modules/varnish/files/default.vcl b/modules/varnish/files/default.vcl index 6e87911ad..bff0524d7 100644 --- a/modules/varnish/files/default.vcl +++ b/modules/varnish/files/default.vcl @@ -3,36 +3,34 @@ ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git ## -backend holter { - # holter.debian.org - .host = "194.177.211.202"; - .port = "80"; -} -backend powell { - # powell.debian.org - .host = "87.106.64.223"; - .port = "80"; + +director packages_debian_org random { + { + .backend = { + .host = "5.153.231.3"; + .port = "80"; + } + .weight = 1; + } + { + .backend = { + .host = "213.165.95.4"; + .port = "80"; + } + .weight = 1; + } } + sub vcl_recv { # Add a unique header containing the client address remove req.http.X-Forwarded-For; set req.http.X-Forwarded-For = req.http.rlnclientipaddr; - ### restart logic, this will redefine the backends if vcl_restart has been triggered - if (req.restarts == 0) { - set req.backend = holter; - } else if (req.restarts == 1) { - set req.backend = powell; - } else if (req.restarts == 2) { - set req.backend = holter; - } else { - set req.backend = holter; - } - + set req.backend = packages_debian_org; - return(lookup); + return(lookup); } sub vcl_fetch { @@ -65,3 +63,4 @@ sub vcl_deliver { return(deliver); } +