title: kubernetes - multiple pods with same app on the same node
body: <p>We are migrating our infrastructure to kubernetes. I am talking about a part of it, that contains of an api for let's say customers (we have this case for many other resources). Let's consider we have a billion customers, each with some data etc. and we decided they deserve a specialized api just for them, with its own db, server, domain, etc.</p>
  <p>Kubernetes has the notion of nodes and pods. So we said &quot;ok, we dedicate node X with all its resources to this particular api&quot;. And now the question:</p>
  <p>Why would I used multiple pods each of them containing the same nginx + fpm and code, and limit it to a part of traffic and resources, and add an internal lb, autoscale, etc., instead of having a single pod, with all node resources?</p>
  <p>Since each pod adds a bit of extra memory consumption this seems like a waste to me. The only upside being the fact that if something fails only part of it goes down (so maybe 2 pods would be optimal in this case?).</p>
  <p>Obviously, would scale the nodes when needed.</p>
  <p>Note: I'm not talking about a case where you have multiple pods with different stuff, I'm talking about that particular case.</p>
  <p>Note 2: The db already is outside this node, on it's own pod.</p>
  <p>Google fails me on this topic. I find hundreds of post with &quot;how to configure things, but 0 with WHY?&quot;.</p>