
That’s one of the core challenges that KEP #3015 aims to help solve. Titled as ‘PreferSameZone and PreferSameNode Traffic Distribution’ the enhancement provides network operators with fine-grained control over traffic routing decisions within clusters. According to the KEP, the goals of the enhancement are to make traffic distribution less ambiguous. How it does that is also reasonably straightforward.
“Add a new value to allow configuring a service so that connections will be delivered to a local endpoint when possible, and a remote endpoint if not,” the KEP states.
From a technical standpoint, that goal manifests as the PreferSameNode traffic distribution feature. The spec.trafficDistribution field within a Kubernetes Service allows users to express preferences for how traffic should be routed to Service endpoints. KEP-3015 deprecates PreferClose and introduces two additional values: PreferSameZone and PreferSameNode. PreferSameZone is an alias for the existing PreferClose to clarify its semantics. PreferSameNode allows connections to be delivered to a local endpoint when possible, falling back to a remote endpoint when not possible.
This functionality addresses a critical performance optimization need in distributed systems. By enabling traffic to remain on the same node when possible, operators can reduce network latency and bandwidth consumption while maintaining service availability through intelligent fallback mechanisms.
The technical implementation works through kube-proxy, which now understands these traffic distribution preferences and makes routing decisions accordingly. When a service specifies PreferSameNode, the proxy first attempts to route traffic to endpoints running on the local node before considering remote alternatives.
DNS search path validation becomes more flexible
Network administrators operating in complex enterprise environments often struggle with DNS resolution challenges, particularly when integrating Kubernetes clusters with existing corporate DNS infrastructure. Kubernetes 1.34 addresses this through KEP #4427, which relaxes DNS search path validation.