X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fvarnish%2Ffiles%2Fdefault.vcl;h=0b9ec708510b246c3d05a1766b7ecdb69a402315;hb=d7c7bb5f8c5c8fa2cda5adcb235c55a32b402634;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..0b9ec7085 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 = "194.177.211.202"; + .port = "80"; + } + .weight = 10000; + } + { + .backend = { + .host = "87.106.64.223"; + .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); } +