title: nodejs cluster socket.io nginx configuration
body: <p>I am running a nodejs cluster with socket.io library.
  I am proxing the request via nginx server.
  Websocket connections are working fine in most of the cases but it is not working with polling as transport protocol in socket.io.</p>
  
  <p>Here's the pseudo code:</p>
  
  <pre><code>if (cluster.isMaster) {
    // Fork workers.
   for (var i = 0; i &lt; numCPUs-1; i++) {
      cluster.fork();
    }
   else{
   var server = http.createServer(function(request, response){
      console.log('Connecting server');
      response.end();
  });
  
  server.listen(port);
  var socket_io = require('socket.io')(server);
  var redis_adapter = require('socket.io-redis');
  //config.redis.ip,config.redis.port
  socket_io.adapter(redis_adapter({ host: config.redis.ip, port: config.redis.port }));
  
  socket_io.use(function(socket, next){
  });
  
  
  socket_io.on('connection', function (socket) {
  };
  </code></pre>
  
  <p>Would like to know is there any issue in the code.
  Do we need to use <a href="https://www.npmjs.com/package/sticky-session" rel="nofollow">sticky-session</a> .If yes what is correct way to use it in my case.</p>