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

Allow failover for replicas #857

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

magec
Copy link
Collaborator

@magec magec commented Nov 11, 2024

Now that #847 is merged, when a pool is set to default_role = replica (or manually set to replica), and no replicas are available, the primary won't be touched at all. Instead, replicas will be automatically set back to available and will be checked for health again.

If you have a single replica and it is actually down, you may find convenient to send queries to the primary until you fix the replica (if the primary can handle the load). To allow this behavior, a new configuration parameter is added to the configuration that will make the primary available to receive queries if every replica in the pool is banned.

### replica_to_primary_failover_enabled
` ` `
path: pools.<pool_name>.replica_to_primary_failover_enabled
default: "false"
` ` ` 

If set to true, when the specified role is `replica` (either by setting `default_role` or manually)
and all replicas are banned, queries will be sent to the primary (until a replica is back online).

Note that when this is enabled, the replicas won't be automatically unbanned (default behavior).

@magec magec force-pushed the replica-with-failover branch 2 times, most recently from d73d700 to f24a572 Compare November 12, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant