<p>I do a load test recently. I found that the pod in cloud will crash down when large amount of request.</p>

<p>The autoscale speed is not fast enough and the service will not available for a while. Should I increase the the minimum pod number or increase the resources of the pod?</p>

Loui5
<blockquote>
  <p>Should I increase the the minimum pod number or increase the resources of the pod?</p>
</blockquote>

<p>Sure, it helped. I would add replicas first and then increase limit.cpu</p>

<p>Increase request.cpu is only useful when node out of resource. It guarantee the minimum cpu your pod can get.</p>

<p>There are a lot of things you can do</p>

<ol>
<li>CDN in front of your service(pods), if your pod most time respond same result.</li>
<li><a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/" rel="nofollow noreferrer">HPA</a>: You need set limit.cpu greater than request.cpu. Let HPA have time to active.</li>
<li>Minimize your docker image size. It's can download fast means launch fast to handle incoming requests.</li>
<li><a href="https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#always-co-located-in-the-same-node" rel="nofollow noreferrer">podAntiAffinity</a>: Make sure your pods are not in same node. </li>
</ol>

<pre><code>
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchExpressions:
              - key: app
                operator: In
                values:
                - web-store
            topologyKey: "kubernetes.io/hostname"
        podAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchExpressions:
              - key: app
                operator: In
                values:
                - store
            topologyKey: "kubernetes.io/hostname"
</code></pre>
