I posted this at the
pivotal.io support but haven't received a response yet, so hoping someone here can provide some input.
We are considering using RabbitMQ for our product but need to know if it should perform well for our use case.
In our use case, a user is associated with a group. A group’s users are typically served by a single server, but can be served by multiple servers at times due to rebalancing, temporary network outages, etc.
The servers retrieve the user and group data from an external database. When the data for a user or group is changed, the servers must be notified of the change so they can update themselves (e.g. retrieve the new/updated data from the database or delete the data as applicable). The servers use pub/sub for this. When the database is updated for a change, a message is published to a topic. The servers subscribe to the topic and then receive these messages.
If there is only a single topic however, this means a large percentage of the messages a server receives are discarded as the user/group being changed is not currently served by the server. This wastes both network and processing resources.
For example, say we have the following:
1,000,000 users
10,000 groups (average of 100 users per group)
20 servers (average of 50,000 users/500 groups per server)
1000+ messages/second on average
A particular server may only serve groups 1-500 for example and hence only need messages for those groups. When the database is updated for a change, a message could be published to a topic such as update.group1 or update.group2.
With RabbitMQ and a topic exchange, the server could use binding keys such as *.group1 - *.group500 or #.group1 - #.group500 to receive only messages for the groups it is currently hosting.
Would this perform well given there would be 10,000 binding keys with each of the 20 servers having 500 binding keys?
I assume the servers can dynamically add and remove binding keys as necessary (e.g. in our use case as groups are loaded to/unloaded from a server)?
Thanks!