Config reloading and persistent client connections.

Ryan Lynch ryan.b.lynch at gmail.com
Fri Jun 10 19:17:41 CEST 2011


When switching to a new config, how does Varnish handle a new request
that re-uses an existing (persistent, keep-alive) client connection?
In other words, given a persistent connection, does Varnish handle
further requests using the old config or the new config?

Based on "man varnishd", I believe that Varnish will always use the
new config, regardless of keep-alives. Here's the quote that makes me
think so, from the section detailing the "vcl.use configname" option:

        "Start using the configuration specified by configname for all new
        requests. Existing requests will con‐ tinue using whichever
        configuration was in use when they arrived."

If I'm wrong about this, I'd appreciate somebody letting me know.

Also, is it possible to change this behavior? Can Varnish handle
config reloads similar to how Apache's "graceful" restarts work?
(I.e., continue using the old config for new requests on existing
connections, so that any given client doesn't experience the config
change until the connection breaks.)

-Ryan




More information about the varnish-misc mailing list