Skip to content

Biased load balancing #217

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

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

Biased load balancing #217

wants to merge 1 commit into from

Conversation

levkk
Copy link
Collaborator

@levkk levkk commented Jun 17, 2025

Description

Add two more load balancing preferences:

  • replicas_only_with_failover: Use replicas for read queries, unless they all fail, and then try the primary. Make sure to set read_write_split = "include_primary" (or leave default)
  • primary_only_with_failover: Use primary for read traffic unless it's banned, and failover to replicas. Same note on read_write_split as above.

Example

[[users]]
name = "analytics"
database = "prod"
load_balancing_strategy = "replicas_only_with_failover"

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