kubernetes-sigs / kubernetes-sigs/gateway-api
Add a priority to a backendRef
- Dominant language
- Go
- Stars
- 3k
- Forks
- 790
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 45
Description
**What would you like to be added**:
Add a field within [backendRef](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io%2fv1beta1.BackendRef) allowing the user to specify the priority of a backend. The algo for traffic distribution could be the following
1. Pick all the healthy backendRefs with the highest priority level
2. Distribute traffic across them based on the `weight` ratio
3. If no healthy backendRef exists for the highest priority, perform above steps for the next priority
**Why this is needed**:
* Cross cluster failover (prioritize service within the cluster before routing outside)
* As a user I would like to specify a default / fallback / back up backend in case my main backend is no longer active
also relates to https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#default-backend
Contributor guide
Assessment
This issue has not been assessed yet.