Restart needed after new backend declared?

Simon Kammerer kontakt at web30.ch
Thu Mar 4 11:27:27 CET 2010


Hi list,

I declared a new backend and added a simple rule in vcl_recv like

if(req.http.host ~ "xx.yyy.com"){
         set req.backend = newbackend;
}

and then used Kristians script to reload VCL:

-------------------------
#!/bin/bash
# Reload a varnish config
# Author: Kristian Lyngstol

FILE="/etc/varnish/default.vcl"

# Hostname and management port
# (defined in /etc/default/varnish or on startup)
HOSTPORT="localhost:6082"
NOW=`date +%s`

error()
{
      echo 1>&2 "Failed to reload $FILE."
      exit 1
}

varnishadm -T $HOSTPORT vcl.load reload$NOW $FILE || error varnishadm -T 
$HOSTPORT vcl.use reload$NOW || error echo Current configs:
varnishadm -T $HOSTPORT vcl.list
-------------------------


But the new backend is not used, I had to restart varnish to use the new 
configuration.

Am I missing something?





Mit freundlichem Gruß
Simon Kammerer

-- 
Web 3.0 AG
Moskau 314B
CH-8262 Ramsen
Tel: +41 (0) 52 533 4725
Fax: +41 (0) 52 533 4625
simon.kammerer at web30.ch



More information about the varnish-misc mailing list