arangodb / arangodb/arangodb-java-driver

Active Failover redirects should not follow Location header

Open
#413 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
210
Forks
96
Avg merge
6h 32m
Merged PRs (30d)
5

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named in the issue. Locate the Java driver's active-failover redirect and retry handling, then verify that failed requests retry configured hosts instead of following the response Location header, while preserving acquireHostList behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.