RabbitMQ + WebSocket Chat Architecture

Viewed 897

I'm developing a chat service using RabbitMQ and WebSockets. This is my architecture:

enter image description here

Some observations:

  • I think the main drawback of this architecture is each WebSocket client receives a copy of the message delivered by Client A. If client B is not connected to this WebSocket, the message is just ignored.
  • Load Balancer B has sticky session enabled, so clients will always reconnect to the same WebSocket service.
  • The number of instances of chat API is not always the same as WebSocket services.
  • Load Balancer ware implemented using Nginx
  • Chat API and WebSocket service both are implemented using Nodejs
  • Clients are Android, iOS, or Web apps.

Do you guys have any tips on how to improve this?

0 Answers
Related