[squid-dev] [PATCH] Do not revive unconditionally dead peers after DNS refresh

Eduard Bagdasaryan eduard.bagdasaryan at measurement-factory.com
Thu Apr 27 20:39:15 UTC 2017


Hello,

This patch fixes peer reviving mechanism for DNS refreshes.

Every hour, peerRefreshDNS() performs a DNS lookup of all cache_peer
addresses. Before this patch, even if DNS lookup results did not change,
the associated peerDNSConfigure() code silently cleared dead peer
marking, if any (CachePeer::tcp_up counter).  Forcefully reviving dead
peers every hour can lead to transaction delays (and delays may lead to
failures) due to connection timeouts when using a still dead peer.

This patch starts standard TCP probing instead of pointless dead peer
reviving, correctly refreshing peer state.  The primary goal is to cover
situation when DNS refresh changes peer addresses list. However TCP
probing may be useful for other situations either, without much overhead
(that is why it starts unconditionally).  For example, we need it when
DNS refresh returns the same addresses list but in different order. Also
it should help with dead idle dead peers detection.


Thanks,
Eduard.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SQUID-287-do-not-revive-dead-peers-after-dns-refresh-t1.patch
Type: text/x-patch
Size: 3400 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20170427/bfecb949/attachment.bin>


More information about the squid-dev mailing list