On 6/12/2013 10:40 AM, Lukas Tribus wrote:
Hi Ramin,
When I have two servers in the backend haproxy makes connections to both
websocket backends and exactly 10 seconds after the client had
negotiated the connection to haproxy the client considers itself
connected to socket.io application.
This is very odd, but I also have to admit I don't know anything about
websocket. Could you start haproxy in debug mode, reproduce it and post the
debug output?
Thanks Lukas and Willy for giving the config the once over. In regards
to haproxy needing to hunt for a working server, that shouldn't be the
case. Each server individually in the backend worked normally when it
was the only server in rotation.
I ran two different tests. One with just one server in the rotation and
a second with all three in the rotation. I also did a tcpdump for the
frontend and backend as well as haproxy in debug. I did turn off check
in the backend to keep the tcpdumps cleaner.
Files are in the URL below and 1_ is one server and 3_ is three servers.
I bumped my haproxy 1.5 deb to the June 11th snapshot w/ pcre, ssl, and
zlib. Ubuntu 12.04 LTS, 64bit, m1.small on EC2.
http://badapple.net/haproxy/
After spending a number of hours on this, I'm leaning towards an
application side problem as Willy suggested. There were some mentions of
early Socket.io not working properly with haproxy. Our local version
should have those fixes, but it is more than a year behind upstream. I
think my next step is set up a current dead simple websocket application
and try to replicate the problem without the unknowns our application
brings.
Ramin