<p>Is it preferable to have a Kubernetes cluster with 4 nodes having resources 4 CPUs, 16 GB RAM or 2 nodes cluster with resources 8 CPUs and 32 GB RAM?</p>

<p>What benefits user will get if they go for horizontal scaling over vertical scaling in Kubernetes concepts.  I mean suppose we want to run 4 pods, is it good to go with 2 nodes cluster with resources 8 CPU and 32 GB RAM or 4 nodes cluster with resources  4 CPU and 16 GB RAM.</p>

Deepa Yr
<p><strong>Horizontal Autoscaling</strong></p>

<ul>
<li><p>Pros</p>

<ul>
<li>Likely to have more capacity since you are expanding VMs or/and servers. You are essentially expanding your cluster.</li>
<li>In theory, more redundancy since you are spreading your workloads across different physical servers.</li>
</ul></li>
<li><p>Cons</p>

<ul>
<li>In theory, it's slower. Meaning it's slower to provision servers and VMs than pods/containers in the same machine (for vertical autoscaling)</li>
<li>Also, you need to provision both servers/VMs and containers/pods when you scale up.</li>
<li>Doesn't work that well with plain bare-metal infrastructure/servers.</li>
</ul></li>
</ul>

<p><strong>Vertical Autoscaling</strong></p>

<ul>
<li><p>Pros</p>

<ul>
<li>In theory, it should be faster to autoscale if you have large servers provisioned. (Also, faster response)</li>
<li>If you have data-intensive apps you might benefit from workloads running on the same machines.</li>
<li>Great if you have a few extra unused bare-metal servers.</li>
</ul></li>
<li><p>Cons</p>

<ul>
<li>If you have large servers provisioned you may waste a lot of resources.</li>
<li>You need to calculate the capacity of your workloads more precisely (this could be a pro or a con depending on how you see it)</li>
<li>If you have a fixed set of physical servers, you will run into eventual limitations of CPUs, Storage, Memory, etc.</li>
</ul></li>
</ul>

<p>Generally, you'd want to have a combination of both Horizontal and Vertical autoscaling.</p>
