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

backend weight and backup option #4446

Closed
dazoot opened this issue Nov 26, 2021 · 2 comments
Closed

backend weight and backup option #4446

dazoot opened this issue Nov 26, 2021 · 2 comments
Labels
feature ⚙️ New feature or request
Milestone

Comments

@dazoot
Copy link

dazoot commented Nov 26, 2021

In nginx / haproxy i can set weight for specific backends and backup (stand by failover) options.
Would love to have this in caddy too.

@francislavoie
Copy link
Member

francislavoie commented Nov 26, 2021

We're working on a rewrite of how upstreams are configured, and having weights is planned (because it'll support using SRV lookups for configuring upstreams, which has weights). Matt recently live streamed some of his work on this, if you feel like watching to get a better grasp of the internals: https://www.youtube.com/watch?v=hj7yzXb11jU

For backup, you can already do this, essentially, by using lb_policy first and enabling health checks so that the primary upstream is marked as unhealthy, which would trigger falling back to the next upstream.

@mholt
Copy link
Member

mholt commented Mar 7, 2022

SRV upstreams implemented in #4470 now honor the weight (and priority) fields of SRV records, which should do what you need.

If not, feel free to reopen this issue and explain more specifically what is required. Thanks!

@mholt mholt closed this as completed Mar 7, 2022
@mholt mholt added this to the v2.5.0 milestone Mar 7, 2022
@mholt mholt removed the in progress 🏃‍♂️ Being actively worked on label Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature ⚙️ New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants