P.Das
P.Das

Reputation: 53

Kubernetes Service load balance techniques

What is the algorithm used in kubernetes Service object when its doing load balancing between PODs. Like I have 2 instances running, and one Service is exposed for both of them. What is the default load balancing rule Service is using and how to customize that?

Upvotes: 0

Views: 276

Answers (1)

Vasilii Angapov
Vasilii Angapov

Reputation: 9042

Kubernetes Service load balancing is round robin by default. So requests to Service will be almost equally distributed between your pods.

You may configure SessionAffinity for Service. The only affinity technique availble is clientIP. Think twice before enabling SessionAffinity because in many cases it is practically useless.

Upvotes: 4

Related Questions