I've built a TCP server which handles RPC (request/reply) type requests from clients, but it also allows services to push events down at ad-hoc times.
If I need to scale in the future, the RPC stuff is quite easy, like web infrastructure, I'll just add more nodes and load-balance.
To scale the push messages, I will need all the servers to coordinate as the client(s) subscribed to the events could be on any server.
My options are:
My temptation is to go with [1] as it is simple and probably works well for up to 20-30 nodes. Is there a consensus on what the best strategies are for different ranges of N, where N is the number of nodes?
Its hard to advise which would be the best strategy without knowing more details. Perhaps what might help would be to list some things to consider for each item:
UDP Broadcast
Interconnected TCP NW
Central Server
Central Server with a tree
Personally, I would look at the pros and cons of each and also consider how each solution addresses the requirements. Hopefully that lesson will make the decision easier.