[PATCH] Add a recycle_maxage attribute to backend definitions.
Poul-Henning Kamp
phk at phk.freebsd.dk
Thu Aug 28 11:22:46 CEST 2014
--------
In message <CANTn4cqPXz0AO6O=YpntGXsnB9v=pw6Sk_k00PutjVh9KRSC7g at mail.gmail.com>
, Martin Blix Grydeland writes:
>I guess it would be possible to add a failed flag to the struct vbc, and
>then have the struct backend keep some running average of (now - last_use)
Well, not exactly an average, since our aim is not to have 50% of our
connections fail, but an "estimate" of some kind.
I was thinking something far more crude and heuristic:
if (recycle fails)
t_est = max(1 second, this connections idle - .5 sec)
else
t_est *= (1 + 1e-6)
The point here is that the actual timeout as implemented by servers is
not precise and not even constant, many servers trim idle connections
on other criteria than idle time (anti-DoS)
At the very least, we should run some real-life tests to see how well
something like the above works...
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the varnish-dev
mailing list