Selecting a node that provides a service

12/10/2014

I would like to understand how a particular node (service-proxy) is selected when there are more than one node that provides the same service. I understand, in this case every service-proxy on each participating node listens on the well-known IP:port (portal) of the particular service (well, it configures iptables rule to catch the packets coming to the portal), and when a request arrives to the node with the portal, iptables rules forward the request to the service-proxy. That is all right. Though, my problem is, if more than a single node uses the same IP address (a.k.a. virtual IP address), how the request is routed to a particular node, and how that node is selected from the available set?

Thank you! Best regards, Laszlo

-- janosi
kubernetes

1 Answer

12/11/2014

Right now the proxy will do a simple round-robin load balancing across the set of pods that are backing a service. Over time, we want to have more/smarter options here, but we find that this simple policy can work in a lot of situations.

-- Joe Beda
Source: StackOverflow