Rabbit Mq for maintaining connections with a lot of users simultaneously

31 views Asked by At

Question How can I handle listening to the request from owner to specific users via the server and notify users? (not a proper notification)

[Owner] ----> [Server] ----> [Database] (Store request data) | |------> [Specific User] (Notify user about the request)

  • FCM has limitations for the use case, ex- when the app is in the background and notifications are not allowed.
  • Opening 1000 WebSocket connections simultaneously could be resource-intensive or not?. Requests from the owner are sent to a unique user via the server.
  • The server stores the request data in the database for live checks and future reference.

Can I use RabbitMQ in this scenario and is it safe to expose it to end users

After the user accepted the request, then file transfer happens for about 10-15 min

[User] |-----> [File Generation] (Generate file every few seconds one after the other, each unique and independent |-----> [File Transfer] (Transfer file every few seconds) ----> [Server] (API request/response)

[Server] ----> [Checker] (Monitor file transfer status)

  • A checker is implemented on the server to monitor file transfer status that mails the user that file transfer stopped please check on their end. -All files needs to be transferred live cannot be done at the end of 10 min.

Question: Is there a way instead of creating 1000 such checker for 1000 users , each independent of each other and scalable for future?

what can be optimal approach for the above scenario. Currently the request are being read from redis every few seconds by hitting the server by the client which is working but needs to scale vertically/Horizontally.

0

There are 0 answers