I'm trying to design a scalable application using the RPC pattern, involving multiple clients and servers. Based on the load, I would like to autoscale the RabbitMQ brokers (running in 2 or more docker containers).
Multiple clients and servers using a single broker is fine, but how do I configure the clients and servers to "discover" and connect to these new RabbitMQ instances as they are spun up (including the new client and server instances that are being spun up as well)?
Any server can process the request of any client as long as the connection is maintained. This is what I have in mind:
The components are spun up similar to the order as specified in the diagram. I want to set limits to how many clients and servers can be connected to a single rabbitMQ instance (the diagram is just an example). Any resources are welcome