Repository navigation
Conversation
cc4f7f3 to
0311e3d
Compare
admirerr
left a comment
There was a problem hiding this comment.
Hi @CJstate , thanks for this contribution, the change itself looks good.
One repo policy item before I can merge: the commits on this PR carry a Co-Authored-By: Claude Code trailer. Aegora does not credit AI tools as co-authors on any PR, so I cannot merge commits that name an AI as a co-author. This is a blanket rule for the repo and nothing about the quality of this change. Human co-authors are welcome anytime.
Could you remove the Co-Authored-By: Claude Code line from the commit message(s) on this branch and push the updated commits? Everything else can stay exactly as it is. Once that is done I will merge right away.
Thanks again for contributing.
0311e3d to
e9bc03c
Compare
|
Removed the |
|
Hi @admirerr — following up on the review. The current head is |
Add an optional per-route weights map keyed by target URL. Pools use smooth weighted round-robin (nginx algorithm) so traffic is interleaved in proportion to the configured weights instead of bursting. Weights default to 1, are rejected with least_connections, and must reference a configured target; unknown or non-positive entries fail validation at load time. Fixes syncronix-labs#20.
e9bc03c to
42954f4
Compare
|
Done — I removed the |
|
Update: the commit messages on this branch no longer contain any |
|
Thanks for the review. I've checked the current commits on this branch: none of them carry a |
|
Hi, following up on this PR. The current head no longer carries any Co-Authored-By or AI attribution trailer, and CI is green. If there is anything else blocking the merge, please let me know; otherwise could you re-submit the review? Thanks. |
|
Thanks for the review. The commit on this PR has been rewritten and no longer carries any |
Summary
Adds optional per-target weights to routes using
round_robin, implemented with smooth weighted round-robin (the nginx algorithm) so traffic is interleaved in proportion to each target's weight instead of arriving in bursts.Fixes #20.
Changes
internal/config: newroutes[].weightsmap keyed by target URL. Validation rejects weights whenlbis notround_robin, unknown target keys, and non-positive values.internal/proxy: addsNewPoolWithWeights(NewPooldelegates to it), a smooth weighted round-robin dispatcher, and a fast path to the existing round-robin loop when every weight is 1.internal/proxy/gateway.go,cmd/aegora/main.go: wire weights through route construction.docs/configuration.md: field row, YAML example, and behavior notes.Motivation and Context
Heterogeneous upstream fleets need proportional traffic (for example, a 10% canary).
least_connectionsexpresses observed load, not operator intent, and behaves poorly when backends have equal speed. Weights default to 1, so existing configurations are unchanged.Behavior notes
Checklist
docs/configuration.mdupdated for the new configuration field.Verification run locally:
go build ./...,golangci-lint run ./internal/proxy/... ./internal/config/... ./cmd/aegora/...(0 issues), andgo test ./internal/proxy/... ./internal/config/... ./cmd/aegora/...(pass). Thetest/integration package was not run locally because it requires Docker-backed services.