[squid-users] How to "active" update NetDB informations ?

Théo BARRAGUE Theo.BARRAGUE.ext at boursorama.fr
Fri Jul 1 14:22:40 UTC 2022


Hello,

I'm facing to issue with squid : i want to use squid to route http traffic though the fastest path ( based on RTT ).

Before to explain my problem, this is my configuration where :

  *   client is a http client : curl, wget, firefox, ...
  *   squid is a squid instance with never_direct allow all option to prevent direct access but with squid a and squid b as parents peers and query_icmp on option
  *   squid a and squid b are squid instances that can make direct connections
  *   all squid instances are cacheless and built with --enable-icmp

[cid:d09aa68c-f986-4341-9d45-52c2a7a7a2d9]

Now, come issues. When squid send a request to squid a or squid b, two ICP packets are sent ( to squid a and squid b ) and the squid which do the direct connection send an icmp to origin server and squid instances update their netdb informations ( squid a or squid b "locally" from icmp answer and squid though ICP ).

If link a slows down, the RTT will increase and squid will send all requests to squid b because his RTT is low.
But, if link a come back and with a lower RTT than squid b, squid a will never know because no requests are made to him until RTT on squid b goes up ( upper than the "uppest" / "oldest" RTT of squid a ).

How to deal with this scenario ? Maybe my approach is bad or even worst, it's not possible with squid ?

I can curl regulary on squid a and squid b to keep RTT up to date but this solution is more a workaround from my point of view than a good solution.
I can also restart squid a and squid b every 5 minutes for example to flush netdb informations but same things as above, not a good solution.

Waiting to read you, i hope you have a solution for my case,
Théo BARRAGUE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20220701/d07829bf/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graphviz.png
Type: image/png
Size: 27112 bytes
Desc: graphviz.png
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20220701/d07829bf/attachment-0001.png>


More information about the squid-users mailing list