Re: [squid-users] Squid Reconfigure Downtime

2022-05-06 Thread Alex Rousskov

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.
___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] Squid Reconfigure Downtime

2022-05-06 Thread Eliezer Croitoru
Hey Mani,

 

With “squid -k reconfigure” there shouldn’t be down time.

There are special scenarios which the complexity or the length of the 
configuration files will result
in a scenario of a slowdown in the overall performance of the service on a 
reconfiguration.

There is a very far possibility which will cause a drop of connections while 
running the reconfiguration.

I will define a rule: if “squid -k parse” doesn’t take too long ( max couple 
secs..which is a lot for most use cases)
it’s simple to assume that it won’t affect the service at all.

 

Just take into account that the proper “ratio” of reconfiguration should be no 
more then once per hour and 
the most widely used reconfiguration is once per day.

 

If you will want to make the service dynamic you can use external_acl and other 
helpers that will allow you
to prevent and reconfiguration of the service when not really required.

 

All The Bests,

 



Eliezer Croitoru

NgTech, Tech Support

Mobile: +972-5-28704261

Email:   ngtech1...@gmail.com

 

From: squid-users  On Behalf Of 
Manikandan Swaminathan
Sent: Friday, May 6, 2022 04:33
To: squid-users@lists.squid-cache.org
Subject: [squid-users] Squid Reconfigure Downtime

 

Hello,

 

I'm new to Squid and am currently researching the use/effects of running 
reconfigurations. I've come across a couple links and forums that talk about 
this, but since some of those are a bit dated I wanted to make sure I have the 
right info...

 

We're currently running Squid 4.8, and I want to know, what is the expected 
downtime when running "squid -k reconfigure"? How does this affect existing and 
incoming connections?

 

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.

 

Thanks,

Mani

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users