title: NodeJS cluster and database connection
body: <p>I have been experimenting clustering in NodeJS (<a href="https://nodejs.org/api/cluster.html" rel="noreferrer">https://nodejs.org/api/cluster.html</a>) and was able to cluster my server.</p>
  
  <p>I have a mongodb connection which gets established when server starts</p>
  
  <p>Earlier this was not a problem since it gets established once (without cluster).</p>
  
  <p>I think, with clustering it establishes once for every cluster (I am unclear about this).</p>
  
  <p>So, should the connection be done once for the entire server (or) once for every worker (or) only for master process?</p>
  
  <p>Which is the recommended way and how can it be achieved?</p>
  
  <p>Thanks in advance.</p>