<p>I understand that the k8s Service basically performs Round Robin on Pods.</p>
<p>If I set the weight of the pods using the 'Destination Rule' of the Istio, what happens to RR of the existing k8s Service? Are load balancing rules in k8s Service ignored?</p>

henry-jo
<blockquote>
<p>I understand that the k8s Service basically performs ROUND ROBIN on Pods.`</p>
</blockquote>
<p>That's correct. It's explained in the kubernetes documentation <a href="https://kubernetes.io/docs/concepts/services-networking/service/#proxy-mode-userspace" rel="nofollow noreferrer">here</a>.</p>
<hr />
<blockquote>
<p>If I set the weight of the pods using the 'Destination Rule' of the Istio, what happens to RR of the existing k8s Service? Are load balancing rules in k8s Service ignored?</p>
</blockquote>
<p>I couldn't find the exact information how it works, so I will explain how I understand it.</p>
<p>As kubernetes service uses kube-proxy's iptables rules to distribute the requests, I assume that istio destination rule can override it with his own rules, and apply them through envoy sidecar. As all traffic that your mesh services send and receive (data plane traffic) is proxied through Envoy, making it easy to direct and control traffic around your mesh without making any changes to your services.</p>
<p>So if you want to change the default ROUND ROBIN to other algorithm (e.g. LEAST_CONN, RANDOM) you can just configure that in your destination rule <a href="https://istio.io/latest/docs/reference/config/networking/destination-rule/#LoadBalancerSettings-SimpleLB" rel="nofollow noreferrer">LoadBalancerSettings.SimpleLB</a>. Note that by default the algorithm is also ROUND ROBIN, same as with kubernetes service.</p>
<p>More about it <a href="https://istio.io/latest/docs/concepts/traffic-management/" rel="nofollow noreferrer">here</a>.</p>
<hr />
<p>Additional resources:</p>
<ul>
<li><a href="https://istio.io/latest/docs/reference/config/networking/destination-rule/#Subset" rel="nofollow noreferrer">https://istio.io/latest/docs/reference/config/networking/destination-rule/#Subset</a></li>
<li><a href="https://istio.io/latest/docs/concepts/traffic-management/#load-balancing-options" rel="nofollow noreferrer">https://istio.io/latest/docs/concepts/traffic-management/#load-balancing-options</a></li>
</ul>
