k8s should I send requests to masters or workers?

7/26/2021

I have a k8s cluster with 3 masters and 10 workers. As I know physically we can send requests to any nodes in a k8s cluster. But what's better? my client's requests reach my load balancer and I can route them to any kind of nodes I want. Should I send client requests to master nodes or worker nodes and why? of course, I've seen this post, and it is not answered my question. https://stackoverflow.com/questions/49266357/k8s-should-traffic-goes-to-master-nodes-or-worker-nodes

-- ehsan shirzadi
kubernetes
load-balancing

1 Answer

7/26/2021

I don't think there is a strict rule about this, it really depends on the use case you have. But I think it is much better to send ingress traffic to worker nodes rather than master nodes. This for two reasons:

1) The goal of master nodes is to keep the kubernetes cluster functional and working at all times. Overloading masters with ingress traffic could potentially make them slower or even unable to do what they're meant to.

2) Another, maybe secondary, reason to send ingress traffic to workers only is that by default cluster autoscaler acts on workers rather than masters so you might end up with overloaded clusters that don't autoscale because part of the load is going to Masters instead of workers.

-- whites11
Source: StackOverflow