Skip to content

DOC-6252 sections about failover behaviour when all endpoints are unhealthy#2768

Open
andy-stark-redis wants to merge 2 commits intomainfrom
DOC-6252-failover-no-dbs
Open

DOC-6252 sections about failover behaviour when all endpoints are unhealthy#2768
andy-stark-redis wants to merge 2 commits intomainfrom
DOC-6252-failover-no-dbs

Conversation

@andy-stark-redis
Copy link
Contributor

Added info about this based on customer feedback. The corresponding section for the Lettuce geo failover page will be added in a separate PR.

@andy-stark-redis andy-stark-redis requested a review from a team February 10, 2026 16:21
@andy-stark-redis andy-stark-redis self-assigned this Feb 10, 2026
@andy-stark-redis andy-stark-redis added the clients Client library docs label Feb 10, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

DOC-6252

Copy link
Collaborator

@dwdougherty dwdougherty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@andy-stark-redis
Copy link
Contributor Author

Thanks @dwdougherty !

Copy link
Contributor

@ggivo ggivo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from Jedis perspective

Comment on lines +422 to +426
in the [Retry configuration]({{< relref "#retry-configuration" >}}) section). However, if the client exhausts
all the available failover attempts before any endpoint becomes healthy again, commands will throw a `JedisPermanentlyNotAvailableException`. The client won't recover automatically from this situation, so you
should handle it by reconnecting with the `MultiDBClient` builder after a suitable delay (see
[Failover configuration](#failover-configuration) for a connection example).

Copy link
Contributor

@ggivo ggivo Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a second look, I don’t think this is technically correct.

Even after a JedisPermanentlyNotAvailableException, if an endpoint becomes healthy again, the client can recover.

JedisPermanentlyNotAvailableException just means that there were no healthy connections for a configured amount of time, so we treat it as a permanent error at that moment. It doesn’t necessarily mean the client is incapable of recovering later.

It also looks like we’re missing an integration test for this scenario — e.g. recovery after a JedisPermanentlyNotAvailableException has already been thrown.

@atakavci — any concerns we clarify this behavior in the docs around JedisPermanentlyNotAvailableException, as it can recover?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ggivo , agreed.
JedisPermanentlyNotAvailableException is the way Jedis signaling to the application that "all unhealthy" state has been stable for some period of time, and configured number of attempts(in regard to configured delay) is already exhausted. So that upon receiving this type of exception, the application would decide how to react to a consistent/stable availability issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@atakavci @ggivo OK, so after the app gets a JedisPermanentlyNotAvailableException does Jedis still keep trying to find a healthy endpoint automatically in the background (so if you try a command again a bit later then it might succeed)? Or do you have to add some code to handle this explicitly from the app (eg, use isHealthy to check all the current endpoints and then use setActiveDatabase to start using a healthy endpoint if you can find one)?

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

Labels

clients Client library docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants