latency based routing for service endpoints in kubernetes cluster

12/23/2019

we have single kubernetes cluster which has worker nodes in multiple data-centres which are in different geography area.

we have a service endpoint which connect to the application pods which are in different data-centres. lets say application A has 2 pods running in Data-CentresY, 2 pods in Data-CentreZ and 2 pods in Data-CentreX. now when requests lands on a service endpoint it route traffic to all these 6 pods which are in different data-centres.

we want to implement a latency based routing for service endpoints where when requests lands on a workers node it should route traffic to its nearest pods or pod with low network latency.

any suggestion or guidance are much appreciated.

-- chitender kumar
envoyproxy
kubernetes
kubernetes-ingress
kubernetes-pod
kubernetes-service

1 Answer

1/1/2020

Use kube-proxy with ipvs mode and use sed - shortest expected delay

Refer: https://kubernetes.io/docs/concepts/services-networking/service/#proxy-mode-ipvs

-- Tummala Dhanvi
Source: StackOverflow