Skip to content
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

Active Failover redirects should not follow Location header #413

Open
rashtao opened this issue Nov 11, 2021 · 0 comments
Open

Active Failover redirects should not follow Location header #413

rashtao opened this issue Nov 11, 2021 · 0 comments

Comments

@rashtao
Copy link
Collaborator

rashtao commented Nov 11, 2021

In active failover all requests must be made against the leader. Requests to followers will be rejected with HTTP 503. The response will contain a Location header that indicates where the actual leader is. The Java driver automatically retries sending the request to the endpoint in the Location header.

Due to server limitations, Active Failover deployment does not allow distinguishing internal and external names for db endpoints.
Therefore the Location header returned from the followers replies refers to the leader's internal name/IP address, which could not be reachable from the driver.

To work around it, the driver requests should not be redirected to the endpoint specified in the Location header, but retried with other hosts from the driver configuration hostlist, which could be manually configured with external names/IPs.

In case the internal names/IPs are reachable from the driver, the user could configure the driver with acquireHostList to discover all the db endpoints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant