[squid-users] Reconfiguring Squid every few seconds
Alex Rousskov
rousskov at measurement-factory.com
Sat Mar 19 14:46:57 UTC 2022
On 3/18/22 20:48, roee klinger wrote:
> I set up Squid to use the interfaces as follows:
>
> tcp_outgoing_address <some_ip>
> I will be running "squid -k reconfigure" multiple times a minute.
> Will this have a bad effect on Squid and traffic?
Yes, it will. Squid reconfiguration is a fairly heavy, disruptive event.
FWIW, we are working on a smooth reconfiguration project that removes
most of the negative side effects of reconfiguration.
> What is my alternative?
There are probably some routing solutions external to Squid, but I
cannot recommend any specific one.
If you are looking for a Squid-specific solution, then hacking Squid
sources to do what you want (without reconfiguration) feels like a
viable short-term workaround. I also see two long-term solutions:
* Smooth reconfiguration: We have an ongoing project that makes Squid
reconfigure just the changed configuration directives, without
disrupting traffic. We can modify Squid to add the tcp_outgoing_address
directive to the list of options that support smooth reconfiguration.
* Dynamic routing: Modify Squid to select the outgoing IP address based
on dynamically computed addresses. The address configuration strings can
be supplied by an external ACL helper or an adaptation service
implementing your custom IP detection logic, including loading the new
IP address from a file.
HTH,
Alex.
More information about the squid-users
mailing list