I'm working on my first multiplayer game (RTS genre) and for the networking model, I'm leaning more towards a peer-to-peer model as opposed to a client-server model. I want my game to be able to handle a large number of users concurrently (around 50-100 users) in a reasonable manner.
I've come up with a proof of concept that can achieve moderate speed and moderate load balancing across the network. For it to work, one of the peers has to be designated as a central authority (i.e. the host). The host then receives updates from users through a star topology and then broadcasts the changes to other users through a tree topology, as below:
This type of network has one big problem: churn. I'm having trouble figuring out how to deal with users that disconnect from the network. If nothing is done for them, all of that user's children (and descendants) will lose connection.
How can I detect disconnected nodes in a peer-to-peer network of my expected size and remove them without harming the other, still-connected clients and without placing undue load on the designated host?