Azure kubernetes - Horizontal scaling vs Vertical scaling

10/5/2020

I understood that Horizontal scaling means increasing numbers of nodes or pods.

Vertical scaling means raising the resources (like CPU or memory) of each node or pods in the cluster.

Can we say HPA to be used when we have the large number of Small group of nodes? and VPA for large node groups?

-- Karthikeyan Vijayakumar
azure
kubernetes

1 Answer

10/5/2020

Answering to your qustion: "Can we say HPA to be used when we have the large number of Small group of nodes? and VPA for large node groups?"

In my opinion this is overgeneralization. It all depends on the microservices that you are running, not on the nodes sizes.

Some applications don't scale well horizontally and the only way to scale them to handle large workloads is scaling them vertically.

On the other hand there are also applications that don't scale well vertically (e.g. programs utilizing only one cpu core) and the only way to scale them is to use HPA (and sometimes even that is not possible, and when this happens you should probably think about rewriting whole appliation).

It all depends on the architecture of your microservices. Of course I am not saying the node size doeasnt matter, you do need to take a node size under consideration, but just saying "use HPA for small nodes and VPA for large nodes" is not completely correct, because it's not always that simple and you need to take more variables into account.

-- Matt
Source: StackOverflow