<p>I am trying to add Horizontal Pod Autoscaling (HPA) to my Kubernetes Deployments. My application is composed by 5 microservices which are connected between them. I have one NodePort (a Traefik service) which is in charge of controlling the traffic from the outside.
The call is a HTTPS POST that sends a csv file which is processed by the application. It can be send via command line or using a web app (UI). The curl command will be like:</p>

<pre><code>curl https://our_app_name -X POST -F "file=@test.csv"
</code></pre>

<p>The questions I have about the functionality of HPA are the following,</p>

<ol>
<li><p>How HPA distributes the calls between the replicas? Is Kubernetes capable of parallel computing, i.e., divide the call between the replicas or each call goes to only one replica?</p></li>
<li><p>Can a replica attend more than one call at the same time?</p></li>
<li><p>In the HPA specifications, for example here:</p></li>
</ol>

<pre><code>  - type: Resource
    resource:
      name: cpu
      target:
       type: Utilization
        averageUtilization: 50
</code></pre>

<p>What is this 50%? Is it 50% of the CPU of the pod or of the cluster?</p>

<p>Thanks in advance for your help!</p>

pquinta
<ol>
<li>Each call goes to only one replica of a pod</li>
<li>You can send as many requests to a pod via ingress/service but it will finally reach to one of the replicas of the pod</li>
<li>with <code>averageUtilization: 50</code> HorizontalPodAutoscaler would attempt to ensure that each <code>pod</code> was consuming roughly <code>50%</code> of its <code>requested</code> <code>CPU</code>. This is not CPU of the node.</li>
</ol>
