[squid-users] Squid Reconfigure Downtime

Alex Rousskov rousskov at measurement-factory.com
Fri May 6 13:23:02 UTC 2022


On 5/5/22 21:33, Manikandan Swaminathan wrote:

> We're currently running Squid 4.8, and I want to know, what is the 
> expected downtime when running "squid -k reconfigure"? 

The actual delay depends on many variables, including the definition of 
"downtime". Very roughly speaking, reconfiguration today can be almost 
as heavy/slow (or as light/fast) as starting Squid from scratch. Certain 
startup actions (e.g., building an in-memory index of cache_dirs) are 
skipped during reconfigurations, and some optimizations (e.g., various 
internal caches) continue to work through reconfigurations, but a lot of 
heavy startup actions are performed during reconfigurations as well.


> How does this affect existing and incoming connections?

Most existing connections, especially short-lived ones, are usually 
unaffected when the configuration does not change much. IIRC, new 
incoming connections may be rejected during reconfiguration (in some 
cases). The code is not written to guarantee much: Squid does _not_ 
maintain a consistent configuration state during (re)configuration. YMMV.


> I ran a simple test in my machine where I reconfigure squid, while 
> separately running multiple proxy requests. As far as I could tell, 
> there wasn't any disruption, but I'd like to get some input from more 
> experienced folks.

Your test did not expose existing problems. I do not know how much those 
problems are going to affect your deployment environment.


FWIW, we have an ongoing "smooth reconfiguration" project that makes 
Squid reconfigure just the changed configuration directives, without 
disrupting traffic. It will take a while to cover all configuration 
directives, but I hope to see the first pull requests that cover some 
directives soon.


HTH,

Alex.


More information about the squid-users mailing list