Skip to content

feat(load-balancing): explain weighted_round_robin strategy - #101

Open
meskill wants to merge 1 commit into
mainfrom
meskill-2026-07-28-feat-load-balancing---upw
Open

feat(load-balancing): explain weighted_round_robin strategy#101
meskill wants to merge 1 commit into
mainfrom
meskill-2026-07-28-feat-load-balancing---upw

Conversation

@meskill

@meskill meskill commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying pgdog-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2ce009e
Status: ✅  Deploy successful!
Preview URL: https://17abcad1.pgdog-docs.pages.dev
Branch Preview URL: https://meskill-2026-07-28-feat-load.pgdog-docs.pages.dev

View logs

@meskill
meskill requested a review from levkk August 13, 2026 14:56

### Weighted round robin

Give some replicas more traffic than others. Each database gets a weight (`lb_weight`, `0`-`255`, default `255`), and traffic is split roughly in proportion to those weights, spread evenly rather than in bursts.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
Give some replicas more traffic than others. Each database gets a weight (`lb_weight`, `0`-`255`, default `255`), and traffic is split roughly in proportion to those weights, spread evenly rather than in bursts.
Give some replicas more traffic than others. Each database gets a weight (`lb_weight`, `0`-`255`, default `255`), and traffic is split roughly in proportion to those weights.


Give some replicas more traffic than others. Each database gets a weight (`lb_weight`, `0`-`255`, default `255`), and traffic is split roughly in proportion to those weights, spread evenly rather than in bursts.

Set a weight to `0` and that database only gets picked once every positive-weight database is banned or unreachable. That's a clean way to keep a small replica around purely as a backup, or to point almost all traffic at one preferred replica.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
Set a weight to `0` and that database only gets picked once every positive-weight database is banned or unreachable. That's a clean way to keep a small replica around purely as a backup, or to point almost all traffic at one preferred replica.

@levkk

levkk commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

I don't think we can use AI to write docs to be honest. It just reads wrong...I can't explain it. It's the uncanny valley:

image

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.

2 participants