I use HAProxy to send requests on a subdomain to node.js.
I can not get WebSockets to work. So far, I could only force the client to establish a connection to WebSocket, but after that a disconnect occurs, which follows very soon.
I am on ubuntu. I used different versions of socket.io and node-websocket-server . The client is either the latest versions of Safari or Chrome. HAProxy Version - 1.4.8
Here is my HAProxy.cfg
global maxconn 4096 pidfile /var/run/haproxy.pid daemon defaults mode http maxconn 2000 option http-server-close option http-pretend-keepalive contimeout 5000 clitimeout 50000 srvtimeout 50000 frontend HTTP_PROXY bind *:80 timeout client 86400000 #default server default_backend NGINX_SERVERS #node server acl host_node_sockettest hdr_beg(host) -i mysubdomain.mydomain use_backend NODE_SOCKETTEST_SERVERS if host_node_sockettest backend NGINX_SERVERS server THIS_NGINX_SERVER 127.0.0.1:8081 backend NODE_SOCKETTEST_SERVERS timeout queue 5000 timeout server 86400000 server THIS_NODE_SERVER localhost:8180 maxconn 200 check
I skipped the list of web pages and mailing lists, but could not get any of the proposed solutions to work.
(ps this might be for serverfault, but there are other HAProxy issues on SO, so I decided to post here)
Ross Dec 05 '10 at 17:45 2010-12-05 17:45
source share