]> git.ipfire.org Git - thirdparty/squid.git/commit - src/neighbors.cc
Do not forward HTTP requests to dead idle peers.
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Fri, 5 May 2017 19:42:51 +0000 (13:42 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Fri, 5 May 2017 19:42:51 +0000 (13:42 -0600)
commit8fcf19ec9bdabc9027a3712324a6b48b95585e6a
treea808afc21431a055b71e9e2371f8e4d52a550394
parent810d879f8beedc3ca6c59ef95e7cc2acf4249abd
Do not forward HTTP requests to dead idle peers.

Squid does not forward HTTP transactions to dead peers except when a
dead peer was idle for some time (ten peer connect timeouts or longer).
When the idle peer is still dead, this exception leads to transaction
delays (at best) or client disconnects/errors (at worst), depending on
Squid and client configurations/state. I am removing this exception.

The "use dead idle peer" heuristic was introduced as a small part of a
much bigger bug #14 fix (trunk r6631). AFAICT, the stated goal of the
feature was speeding up failure recovery: The heuristic may result in
HTTP transactions sent to a previously dead (but now alive) idle peer
earlier, before the peer is proven to be alive (using peer revival
mechanisms such as TCP probes). However, the negative side effects of
this heuristic outweigh its accidental benefits. If somebody needs Squid
to detect revived idle peers earlier, they need to add a different
probing mechanism that does not jeopardize HTTP transactions.

Nobody has spoken in defense of this feature on Squid mailing lists:
http://lists.squid-cache.org/pipermail/squid-users/2017-March/014785.html
http://lists.squid-cache.org/pipermail/squid-dev/2017-March/008308.html

The removed functionality was not used to detect revived peers. All peer
revival mechanisms (such as TCP probes) remain intact.
src/neighbors.cc