title: What are issues with using WebSockets with proxies and load balancers?
body: <p>I'm reading up on <a href="https://github.com/sockjs/sockjs-node#websocket-compatible-load-balancer" rel="noreferrer">SockJS node server</a>. Documentation says: </p>
  
  <blockquote>
    <p>Often WebSockets don't play nicely with proxies and load balancers. Deploying a SockJS server behind Nginx or Apache could be painful. Fortunately recent versions of an excellent load balancer HAProxy are able to proxy WebSocket connections. We propose to put HAProxy as a front line load balancer and use it to split SockJS traffic from normal HTTP data. </p>
  </blockquote>
  
  <p>I'm curious if anyone can expand on the problem that is being solved by HAProxy in this case? Specifically:</p>
  
  <ol>
  <li>Why websockets don't play nice with proxies and load balancers? </li>
  <li>Why deploying Sockjs sever behind Apache is painful?</li>
  </ol>