envoyproxy/gateway
BackendTrafficPolicy ConsistentHash (SourceIP) not working for UDPRoute
Open
#9,534 opened on Jul 20, 2026
help wantedkind/bug
Repository metrics
- Stars
- (2,871 stars)
- PR merge metrics
- (PR metrics pending)
Description
Description:
When we change the load balancing policy in BackendTrafficPolicy to consistent hashing based on source IP (ConsistentHash + SourceIP), we notice that if it targets a UDPRoute, the traffic is not routed consistently by the source IP; instead, it still feels like it is being distributed randomly.
I wanted to check if this is a known limitation of the current Gateway API or our specific controller regarding the UDP protocol. Has anyone else run into a similar issue with UDP session persistence failing?
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: BackendTrafficPolicy
metadata:
creationTimestamp: "2026-07-20T14:37:19Z"
generation: 3
name: udp-policy
namespace: test
resourceVersion: "73853849"
uid: 3005640b-8be2-4204-b128-a1ea74c38ade
spec:
loadBalancer:
consistentHash:
tableSize: 65537
type: SourceIP
type: ConsistentHash
targetRefs:
- group: gateway.networking.k8s.io
kind: UDPRoute
name: route-udp-10000
status:
ancestors:
- ancestorRef:
group: gateway.networking.k8s.io
kind: Gateway
name: test-1
namespace: test
sectionName: listener-udp-10000
conditions:
- lastTransitionTime: "2026-07-20T16:40:32Z"
message: Policy has been accepted.
observedGeneration: 3
reason: Accepted
status: "True"
type: Accepted
controllerName: gateway.envoyproxy.io/gatewayclass-controller