I have tried every conceivable haproxy configuration posted in blogs and stackoverflow, but I still cannot get haproxy and socket.io to work 100% of the time. In the majority of browsers that "support" web sockets it fails and falls back on long polling after missed heart beats. The browser appears to make the initial connection (nodejs debugging), but I cannot get the clients to receive the connection response. Is anyone else having similar problems? Below are the software version numbers and a couple of the configs I have tried.
- haproxy 1.4.18
- node 0.6.5
- socket.io 0.8.7
Haproxy configurations (I have tried many more and numerous options):
- http://engineering.bistri.com/post/14307969768/socket-io-haproxy-http-authentication
- HAProxy + WebSocket Disconnection
- http://pastebin.com/H3XNv0TQ
- http://www.darkcoding.net/software/proxy-socket-io-and-nginx-on-the-same-port-over-ssl/ (minus ssl stuff)
Web sockets working in:
- Safari 5 (Windows)
- Chrome 11 (Linux)