title: Socket.io - how to use listeners
body: <p>I've looked around for an answer regarding this question, I am not sure if I am going about this the right way.</p>
  
  <p>I have a node.js application that uses socket.io to push and receive data from the node server to the client. Most of the requests sent to nodejs are through HTTP Requests while the data pushed to the website is received through a socket.</p>
  
  <p>I currently have unique namespaces for each of the individual listeners (for example I have a feed with comments, this means I have <strong><em>feed/{ID}</em></strong> as the listener as well as each comment has <strong><em>comment/{COMMENTID}</em></strong>. <em>This means if there are 25 feed posts, I would have 26 (including the feed) listeners listening for the feed alone.</em></p>
  
  <p>I am not entirely sure how socket.io pushes data through the listeners (is each listener a new socket?). In my mind, if I have a large amount of users online at one point and a single comments listener it will be hit many times with useless, unrelated data - in comparison to now where it will only receive data relevant to the user.</p>
  
  <p><strong>What is the best way to set up the listeners?</strong> </p>
  
  <p><strong>Is more or less listeners beneficial?</strong></p>