node.js - How to reconnect to the same instance in node cluster? -


we have multiplayer game written in node js.

we want run server in cluster mode using pm2 (4 instances example), wondering how automatically reconnect user same instance.

if user reconnects (reloads browser example) or how identify instance user belong , connect instance?

the game stateless need connect user same instance continue game process, when he/she reloads game.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -