Multi-node / load balancing router nodes



I’ve been using Crossbar and Autobahn for a hobby project that suddenly became very popular, and so I’ve started to need to think about load balancing - specifically of the router node.

A single node seems very happy to support in the region of ~10k concurrent users in my setup, but at that point I’m starting to saturate the network connection of the (cheap VPS) server the node is running on! Worse, this was meaning that my publishers were losing connection and continually trying and failing to reconnect, while all the subscribers were connected with nothing to subscribe to.

(Incidentally - Crossbar was much happier on its own than trying to run it behind an nginx proxy. The latter quickly exhausted available file handles and generally slowed things down…)

The most recent message I can find on this group suggests that scaling via multiple router nodes will be commercially-supported only. That being the case (and even in that case, it not yet being available), has anyone got any experience of solving this scenario in another way?

My tentative ideas involve running secondary router nodes with relaying processes that connect to both primary and secondary. The relays can use pattern-based subscriptions on the primary node and copy those messages over to the secondary. I’d need to work out how to handle RPC with this setup too (and consider if it will cause more problems than it solves first!). Perhaps RPC could use Crossbar’s HTTP gateway on the primary node (possibly via proxy) without connection keep-alive?

I’d be interested to hear what other people’s thoughts and experiences are.