antrea-io / antrea

Kubernetes networking based on Open vSwitch
https://antrea.io
Apache License 2.0
1.65k stars 362 forks source link

Add support for Traffic Distribution in AntreaProxy #6592

Closed antoninbas closed 1 week ago

antoninbas commented 1 month ago

Traffic Distribution was introduced as an Alpha feature in K8s 1.30: https://kubernetes.io/docs/concepts/services-networking/service/#traffic-distribution (ServiceTrafficDistribution feature gate). It adds the .spec.trafficDistribution field to Services. When the field is set to PreferClose, the Service proxy will prioritize sending traffic to endpoints within the same zone as the client (e.g., for performance or cost reasons).

See also https://kubernetes.io/docs/reference/networking/virtual-ips/#traffic-distribution for more details.

We should look into implementing support for this field in AntreaProxy.

luolanzone commented 1 month ago

@hongliangl please take a look at this issue when you have some bandwidth. Thanks.

antoninbas commented 2 weeks ago

@hongliangl can we close this now?

hongliangl commented 1 week ago

We can close it right now because we have aligned with kube-proxy behavior. If anything is updated in K8s upstream about the feature, we can reopen it again in the future.