I'm making an io game. The app is divided into main thread and worker threads. In every thread is an Express server running and a Socket.io server binded to it. I want to be able to switch between these servers, so the thread does all the work for itself. How do i redirect between these threads? If i use proxy, there will be one main thread, and redirect() or location change doesnt work with ports. The server code is inspired by this and this example.
Asked
Active
Viewed 39 times
0
-
You should add the code that you have, at least the part where you create your express server. What do you mean by "redirect between these threads" – Koray Gocmen Jan 18 '18 at 18:10
-
I edited my post noting that there is a Socket.io server binded to the Express. Redirect, i mean to switch between those threads created to handle the load, because on every thread will be different game room. Solving this with Socket.io's room or namespace system doesn't solve the load problem, that's why there are multiple Express servers. – Daniel Rendy Všetečka Jan 18 '18 at 19:58