title: Using Redis as PubSub over Socket.io
body: <p>I am creating a chat application which enable users to do private and group chats. Planning to use following technologies for this app:-</p>
  
  <p>NodeJs + Socket.io + Redis + CouchDB(To store message history) + AngularJS</p>
  
  <p>Per my initial research using Redis as a PubSub service is better approach over using Socket.io as pub-sub .Reason of this is if different users are connected to different server instances, then using socket in this scenario will create problem as message send by user 1 will not pass on to user 2(user 1 connected to server 1 and user 2 connected to server 2).</p>
  
  <p>But if we use Redis, then per my understanding we have to create new channels to enable private chats. And their is a limit to 10k channels in Redis. </p>
  
  <p>My Doubts are</p>
  
  <ol>
  <li>Do I need to create new channel every time to enable private chat between two users?</li>
  <li>If I need to create separate channels, then is there actually a limit of 10K channels?</li>
  <li>I need a working example of using Redis as pub/sub with socket.io to enable private chats.</li>
  </ol>
  
  <p>Regards,
  Vikram</p>