Hi Piotr,

On Fri, Jan 15, 2016 at 02:04:30PM +0100, Piotr Rybicki wrote:
> Hi Guys!
> 
> I've recently discovered odd behaviour regarding keep-alives in haproxy 
> and sites with HTML5/js/ajax ultra-fancy stuff. Some (random) requests 
> are not loaded (like images). Disabling keep-alive in haproxy solves 
> this issue. 'Normal' sites seems to be working fine with keepalives on.
> 
> Is there anyone, experiencing the same issue?

I'm not aware of any such report. Does it happen a lot or just once in
a while ?

> What are the best practices using keep-alive in haproxy (for client and 
> backend) ?

There's nothing specific to think about. Usually you don't want too large
keep-alive timeouts to avoid keeping connections open for nothing, but
that's about all.

> I believe - timeouts should be the same, although timeouted keep-alive 
> conn should be reconnected transparently.

The client automatically retries a failed request over a keep-alive
connection, that's mandated by the spec since nobody can predict when
the middle will close, and that due to network latency, both the client
and the server may decide to close at the same time and each of them
will receive the other one's notification after their action.

> I recall someone probably reported similar issue, but can't find that in 
> archives.

I don't have this in mind. We had many issues during 1.5-dev and these
versions were used a lot in production due to SSL, so maybe it was one of
them.

> haproxy 1.5.15, linux 3.18.24

Have you checked if this happens more (or only) with a specific browser ?
Have you tried to increase the keep-alive timeout to insane values just
for a test (ie: at least the test session's duration) ? Also, could you
check if you're seeing it more in HTTP or HTTPS ?

Regards,
Willy


Reply via email to