title: How to scale socket.io on restify?
body: <p>I am trying to scale socket.io running on restify. I was able to set it up to run great on one nodejs instance. Now when I scale my app to four instances, the app ecosystem broke (i.e., events were not synched correctly between clients).</p>
  
  <p>I'm looking for examples on how to set up sticky sessions with restify. Or, how is it being done nowadays?</p>
  
  <p>The update on sticky session was a year ago: <a href="http://socket.io/blog/introducing-socket-io-1-0/#scalability" rel="nofollow">Socket 1.0 Update / Scalability</a>. </p>
  
  <p>I found these two blogs on setting this up but they both used Express and were also written more than a year ago: </p>
  
  <ul>
  <li><a href="http://www.ibm.com/developerworks/cloud/library/cl-bluemix-node-redis-app/index.html_" rel="nofollow">Article 1</a> </li>
  <li><a href="http://blog.pivotal.io/pivotal-cloud-foundry/products/scaling-real-time-apps-on-cloud-foundry-using-node-js-and-redis" rel="nofollow">Article 2</a></li>
  </ul>
  
  <p>As I am making a headless API, I think Express should not be used. Is it the recommended way of thinking or I should just use Express?</p>
  
  <p><strong><code>package.json:</code></strong></p>
  
  <pre><code>  "dependencies": {
      "hiredis": "^0.4.1",
      "pouchdb": "^4.0.3",
      "pouchdb-upsert": "^1.1.3",
      "redis": "^2.0.1",
      "restify": "^4.0.0",
      "socket.io": "^1.3.7"
    }
  </code></pre>
  
  <p>Any help would be appreciated!</p>