title: Socket.io namespace limit and how to scale it
body: <p>I have socket.io application that must handle a lot of namespaces. I'm wondering what is the limit of the number of namespaces socket.io instance can handle, is there any issue if I'm creating like 10k namespaces. How can I scale to make something like scharding across multiple socket.io instances (each instance handle 1k namespance for example). Actually, I can scale just to support multiple users but all my instances must handle all namespaces.</p>
  
  <p>UPDATE1:</p>
  
  <p>The problem I'm trying to solve is the following, I have a multiplayer card game (like poker) and each room, where 4 players are playing the game, is modeled by socketio namespace. Since I'm expecting thousands of concurrent players, my socketio instance should handle this amount of namespaces. 
  I've already implemented the scalability solution explained in <a href="http://socket.io/docs/using-multiple-nodes/" rel="nofollow" title="Socket.io website">Socket.io website</a>. When I scale out, this node snippet I run in the new instance so it can handle all the namespaces created before.</p>
  
  <pre><code>rooms.forEach(function(room){
      var socketRoom = io.of('/room/' + room.id)
      .on('connection', function(mySocket){
          return handleTableSocket(mySocket, socketRoom, room);
      });
  });
  </code></pre>
  
  <p>So is it a good idea to model each game room with socketio namespace? What if the number of namespaces grow up?</p>
  
  <p>Cheers</p>