aiorabbit
aiorabbit copied to clipboard
Cluster connections (feature request)
I recently had to deal with cluster failures in my production environment. I created a test environment using blockade following this blog, and found that aiorabbit is aware when it's connection fails (which other clients I tested weren't).
However that still leaves me with the problem of what to do when my connection fails.
The behaviour I would like would be for the client to choose the next node and reconnect.For example I notice the mongodb connection url takes a comma separated list of nodes.
Would this be a good feature to have in aiorabbit, or would it best live outside the library?
Hmm, I could see adding that functionality for sure. I need to investigate what needs to change to support it.
On my end, I use a service discovery system (consul) and connect to a hostname (rabbitmq.service.foo.consul) which resolves to multiple hosts. Taking a similar approach (manually in DNS for example) could be a good way to approach this in the interim.