title: NodeJS + SocketIO: Scaling and preventing single point of failure
body: <p>So the first app that people usually build with SocketIO and Node is usually a chatting app. This chatting app basically has 1 Node server that will broadcast to multiple clients. In the Node code, you would have something like.</p>
  
  <pre><code>//Psuedocode
  for(client in clients){
    if(client != messageSender){
      user.send(message);
    }
  }
  </code></pre>
  
  <p>This is great for a low number of users, but I see a problem with this. First of all, there is a single point of failure which is the Node server. Second of all, the app will slow down as the number of clients grow. What is there to do then when we reach this bottleneck? Is there an architecture (horizontal/vertical scaling) that can be used to alleviate this problem?</p>