title: HTML5 websockets: max number of open connections?
body: <p>HTML5 websockets are (and <a href="https://stackoverflow.com/questions/6224771/disadvantages-of-websockets">have been for some time</a>) a hot topic as they elegantly enable <em>real-time</em> <a href="http://en.wikipedia.org/wiki/Push_technology#HTTP_server_push" rel="noreferrer">server-side push</a>.</p>
  
  <p>I currently have a working application with websockets powered by Tomcat 7.0.30 which includes <a href="http://www.tomcatexpert.com/blog/2012/05/01/how-apache-tomcat-implemented-websocket" rel="noreferrer">websocket support</a>. But moving this to a production environment raises questions.</p>
  
  <p>Mainly I would like to know the possible maximum number of connections that can operate (be <em>open</em>) concurrently per <em>browsing session</em>; a <em>browsing session</em> implies a single browser tab or window.</p>
  
  <p>Do open websocket connections add up to the maximum number of connections that can be processed simultaneously by the Web server? E.g. <a href="http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxclients" rel="noreferrer"><code>MaxClients</code></a> in Apache.</p>
  
  <p>Conversely, is the maximum number of websockets for a single <em>browsing session</em> limited by the browser itself? As this <a href="http://blog.dennis-boldt.de/?p=177" rel="noreferrer">blog post</a> shows, up to April 2012, different browsers support varying amounts of <em>open</em> websocket connections. (I personally would aim for 1 open websocket per <em>browsing session</em>; but this info would still be good to know).</p>
  
  <p><strong>TL/DR:</strong></p>
  
  <ol>
  <li>What limits the amount of possible websockets <em>per browsing session</em>? Is it the client? The server? Or a combination of both?</li>
  <li>Does the same limitation(s) apply to both <code>ws:</code> and <code>wss:</code> connections?</li>
  </ol>