<div dir="ltr">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) on BackendClose() where failed==true and recycled==true. But for that approach to get close to accurate, the time the connection fails would need to be picked up accurately, which would make the nanny thread keeping a poll() running on the connections necessary.<div>
<br></div><div>But in the case of these transparent loadbalancers that don't RST an open connection that poll() would not succeed in noticing the connection goes bad, and then the averaging value would not be accurate any more. It would be averaging when we happened to notice the bad connection due to a reused backend connection attempt failing instead of when the connection actually went bad.</div>
<div><br></div><div>So I guess the answer is no, I can't think of any sensible way we could make this auto-tuning.</div><div><br></div><div>What the default value should be is another good question. I put it at 60 because it's a round number, and long enough for it to not bother people who don't need the feature. Perhaps we should have a 'disabled' value instead and default to that. And then it can be turned on for those that actually need it. Or even put it at e.g. 10 seconds, and we might sort out some problems for people being hit by this. Input most welcome :)</div>
<div><br></div><div>Martin</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 28 August 2014 10:37, Poul-Henning Kamp <span dir="ltr"><<a href="mailto:phk@phk.freebsd.dk" target="_blank">phk@phk.freebsd.dk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">--------<br>
In message <<a href="mailto:1409151673-23375-1-git-send-email-martin@varnish-software.com">1409151673-23375-1-git-send-email-martin@varnish-software.com</a>>, Mar<br>
tin Blix Grydeland writes:<br>
<br>
Is there any (sensible) way we can make this auto-tuning ?<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20<br>
phk@FreeBSD.ORG | TCP/IP since RFC 956<br>
FreeBSD committer | BSD since 4.3-tahoe<br>
Never attribute to malice what can adequately be explained by incompetence.<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><table border="0" cellpadding="0" cellspacing="0" style="font-size:12px;line-height:1.5em;font-family:'Helvetica Neue',Arial,sans-serif;color:rgb(102,102,102);width:550px;border-top-width:1px;border-top-style:solid;border-top-color:rgb(238,238,238);border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);margin-top:20px;padding-top:5px;padding-bottom:5px">
<tbody><tr><td width="100"><a href="http://varnish-software.com" target="_blank"><img src="http://www.varnish-software.com/static/media/logo-email.png"></a><span></span><span></span></td><td><strong style="font-size:14px;color:rgb(34,34,34)">Martin Blix Grydeland</strong><br>
Senior Developer | Varnish Software AS<br>Cell: +47 21 98 92 60<br><span style="font-weight:bold">We Make Websites Fly!</span></td></tr></tbody></table></div>
</div>