<p>My product has client POD and server POD with 3 replicas.
To improve the performance, I am colocating the client and Server PODs in same node using &quot;POD affinity&quot; rules to same node and rouring traffic to Server POD on same node using &quot;Service Topology&quot; feature setting topology key to &quot;kubernetes.io/hostname&quot;.</p>
<p>What will happen if auto-scaling is enabled on Server POD ?
Is the newly created server POD started on same node as that of the one being scaled?
If so, Is the load from client distributed only to Server PODs on same machine?</p>
<p>Thanks</p>

Chandu
<p>Service topology does not guarantee co location of related pods in a node. Service topology enables a service to route traffic based upon the Node topology of the cluster. For example, a service can specify that traffic be preferentially routed to endpoints that are on the same Node as the client, or in the same availability zone.</p>
<p>For colocation of related pods in a node use <a href="https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity" rel="nofollow noreferrer">inter pod affinity</a></p>
<p>Because of pod affinity newly scaled pods will be started on same node and because of service topology traffic will be routed to pods on the same node.</p>
