Load Balncing Proxy for Servers
Posted: Wed Jul 26, 2017 5:02 pm
Hi,
as everyone is painfully aware Factorios Serversoftware is singlethreaded.
Instead of rewriting the Server and getting away from a single event loop i suggest building a second program, that acts as a loadbalncing proxy for server processes.
It would achive that by relaying messages between multiple server instances and to/from connected players.
The server instances wont need to handle any complex tasks for players connected to other instances but would only made aware about actions on players connected to it (shooting) and other changes to the level (building/removing of objects, droping/removing of items).
The proxy would do the actual mixinmg of the instances stats into something that contains all players and so on to be transmitted to the clients.
you could think of it as a mix of http reverse proxy LBs (e.g. apache mod_proxy) with multiple backend instances and IRC networks.
Such a Software would allow to scale games across multiple servers and utilize all cores of a machine by running as many instances as there are spare cores.
Also there wouldnt be any need to change existing setups and new setups could even scale dynamicly if needed (and implemented into the proxy)
as everyone is painfully aware Factorios Serversoftware is singlethreaded.
Instead of rewriting the Server and getting away from a single event loop i suggest building a second program, that acts as a loadbalncing proxy for server processes.
It would achive that by relaying messages between multiple server instances and to/from connected players.
The server instances wont need to handle any complex tasks for players connected to other instances but would only made aware about actions on players connected to it (shooting) and other changes to the level (building/removing of objects, droping/removing of items).
The proxy would do the actual mixinmg of the instances stats into something that contains all players and so on to be transmitted to the clients.
you could think of it as a mix of http reverse proxy LBs (e.g. apache mod_proxy) with multiple backend instances and IRC networks.
Such a Software would allow to scale games across multiple servers and utilize all cores of a machine by running as many instances as there are spare cores.
Also there wouldnt be any need to change existing setups and new setups could even scale dynamicly if needed (and implemented into the proxy)