-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Built-in support for Active Failover #477
Comments
Hi @JLedel , it makes sense to me to add support for this in this project. I'm not familiar with the active failover sequence and implementation in ArangoDB, I will take a closer look. But at a glance I would propose to:
What do you think? |
We looked at the go driver which just cycles between the connections until it finds a leader (for cluster as well): https://github.com/arangodb/go-driver/blob/ae64363de2bc9a13e5ef03115489e19fc9439793/cluster/cluster.go#L202 But yes, a |
Sounds good 👍 |
If you're using an active failover setup and happens to query a follower, or there is a leader change, you'll get an exception telling that the node is not a leader anymore.
I guess the reasonable fix is to allow the
HttpApiTransport
class to be created with multiple endpoints, and then have the transport silently either try the other one suggested by the header, or just go through the list of provided servers until one that's leader is found.Is there any interest to add support for this in this project as well? If so, we could try to coordinate it so that our implementation works for this connector as well.
The text was updated successfully, but these errors were encountered: