On Wed, Jan 11, 2017 at 07:27:08PM +0100, Lukas Tribus wrote:
> Hello,
> 
> 
> Am 11.01.2017 um 14:44 schrieb Willy Tarreau:
> > On Wed, Jan 11, 2017 at 01:41:27PM +0200, Ciprian Dorin Craciun wrote:
> > > Unfortunately a lot of these sites have hard-coded resources with the
> > > `www` alternative domain and HTTP-only.  Therefore at least until we
> > > rewrite those (which given their low-value might be delayed forever),
> > > we'll end up with a lot of redirects (10-20 redirects first page
> > > view), and because the close behaviour of HAProxy, we end up with a
> > > lot of short-lived connections.  (This is not so much a load issue, as
> > > it is a page load latency issue due to the TCP connection
> > > establishment overhead.)
> > I didn't think about that case, it definitely makes sense. In fact I
> > mostly focused on first redirection without thinking about systematic
> > redirection caused by a migration (for example). Now I'm starting to
> > think that we should never close by default and that we should change
> > this behaviour as it's counter-intuitive.
> > 
> > I don't know what others think.
> 
> I agree; in a full keep-alive world, we should not try to close "by
> default", but let
> the actual keep-alive code do its job.
> 
> But if we do remove those conditions, I guess we break a number of "old
> assumptions"
> and we will hit new code paths, so there is a potential for bugs :)

No there are really no assumptions regarding this one, the way it's
done is already a hack. In fact it made quite some sense before 1.6
because keeping 2 buffers allocated for an idle connection was
expensive. Since 1.6, the request and response buffers are released
so we don't use much memory and the idle connection is cheap.

In my opinion it's a bit late to change 1.6 now but I'm even fine for
tagging this as a minor bug (in that it's an inheritage from the past)
and backporting it to 1.7.

Thanks!
Willy

Reply via email to