Imagine that you want to horizontally scale the chat application by running two instances of the chat app on different servers. Suppose you are using an in-memory SimpleBroker as well.
In Figure 12-1, Jorge and John have a WebSocket connection to server 1, and Xuxa has a WebSocket connection to server 2. What would happen if Jorge tries to send a message to Xuxa? Well, I think you already know the answer! Since Xuxa is not connected to server 1, that server doesn’t know about the user Xuxa. Thus, the message will be lost. However, if Jorge sends a message to John, ...