kubernetes-sigs / kubernetes-sigs/gateway-api

Add a priority to a backendRef

Open
#1,802 17 comments 2 reactions 1 assignee Claimed by @arkodg View on GitHub
help wanted kind/feature lifecycle/stale priority/backlog triage/accepted
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.