Note that there are some explanatory texts on larger screens.

plurals
  1. POHAProxy + Socket.IO + TornadIO Constant Disconnects on Heartbeat
    primarykey
    data
    text
    <p>So, I am having trouble load balancing socket.io on port 8888 using HAProxy. My setup is NGINX listening on port 80, and load balancing between Tornado web server instances running on port 80. Then, on the same load balancer, I have a HAProxy instance listening on port 8888, forwarding requests to OTHER computers in the network hosting TornadIO server instances also running on 8888. The connection works for the first 30 seconds or so, and then begins to disconnect / reconnect repeatedly. What's important to notice is that it seems like it breaks on the first heartbeat attempt ... is the heartbeat a different protocol that HAProxy would have trouble with as opposed to the first connection attempt / first few messages exchanged?</p> <p>Interestingly, this DOES NOT happen when the tornadIO instance is running on the same computer as the load balancer, even with HAProxy working (but connecting port 8888 and lets say the tornadIO instance on port 9000). </p> <p>It's important to note that TornadIO does not throw any exceptions, or any upset output during this entire process, showing that its not my server code but something in the proxy layer?</p> <p>Let it also be known that I am using RabbitMQ to synchronize all the TonadIO clusters, not that I think it matters (and HAProxy does not touch Rabbit)</p> <p>Here is my HAProxy setup:</p> <pre><code>global daemon maxconn 256 defaults mode http timeout connect 5000ms timeout client 50000ms timeout server 50000ms listen http-in balance roundrobin option forwardfor # This sets X-Forwarded-For timeout queue 5000 timeout server 86400000 timeout connect 86400000 bind *:8888 server server1 18.181.3.164:8888 # ether1 </code></pre> <p>In my nginx configuration, I have inserted:</p> <pre><code>location ~* \.(eot|ttf|woff)$ { add_header Access-Control-Allow-Origin *; } </code></pre> <p>to make sure its not an access control problem (the console does not say it is, so it shouldnt be). </p> <p>I have also tried adding </p> <pre><code>option http-server-close option http-pretend-keepalive </code></pre> <p>to my HAProxy config, but to no avail. </p> <p>Any ideas?</p> <p>** I am testing in Chrome 9.0.597 and Firefox 3.6 (so with both web sockets, and without, same thing)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload