Lets say I have multiple websocket servers that maintain many connections to clients to send updates. These websocket servers will be pulling said updates from a rabbitmq broker, and broadcasting them to all relevant clients who happen to be on a page that needs an update.
My question is how can all clients who are on page[x] get an update for it if they are split up across multiple websocket servers? WS-server-A will recieve an update and forward it out to all its clients on page[x], but whate about the clients connected to WS-server-b who has clients on the same page?
(edited below to add more details)
The way I'm imagining this scenario is like so:
For an imaginary forum, we have a multi-threaded web server that does page rendering and responds to api calls. When someone saves a post on a topic, the web server saves the post to the db, then passes the post off to rabbitmq.
Rabbitmq forwards this post to the relevant exchange (say, 'new-posts'. There are also other exchanges: 'new-topics', 'alerts', etc), where the websocket server picks it up, examines the "header" and forwards the post to all users who are on the relevant page.