Description
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.