Friday 15 April 2016

Architecture question about setting up two servers for one app.

So I'm not really a programmer, but I built this pretty awesome game with node and socket.ioBut I want to have two servers, one on the west coast and one on the east coast for best performance, and I want one server to be a load balancer and determine which server the client will connect to..The thing is I have NO idea how to do this, I've tried doing research on nginx and load balancing in general but I don't have the expertise to convert what I've researched into what I need..Does anyone know any middlewares that can help me accomplish this?How my game works right nowI run server.js on the server and the only routed page I have is the home page which then loads the game.So basically I want server.js to determine which server the client's IP is closer to, and then connect him to that server for the gameBut I don't know how to do this at all and my research isn't really working out. I'm looking for books, videos, articles, anything that can help me figure this out. Thanks.

Submitted April 16, 2016 at 05:32AM by node_newb

No comments:

Post a Comment