<p>I am new to k8s, and I have a question regarding the use cases of ingress and IPVS.</p>
<p>According to what I have read in several articles on the internet, ingress is used for load balancing in north-south traffic toward pods. There are several ingress-solutions out there, like traefic-nginx-haproxy, etc.
Here comes my question, what is the use case of IPVS transport-layer load balancing?
Can we use it for the east-west traffic between pods..?</p>
<p>Please correct me if I have a misconception of the above.</p>
<p>Cheers</p>

Dimmy Sarris
<p>IPVS is layer 4 load balancing at linux kernel level.</p>
<p>i read somewhere it can handle around 100,000 forwarding requests per second.</p>
<blockquote>
<p>Even though Kubernetes already support 5000 nodes in release v1.6, the
kube-proxy with iptables is actually a bottleneck to scale the cluster
to 5000 nodes. One example is that with NodePort Service in a
5000-node cluster, if we have 2000 services and each services have 10
pods, this will cause at least 20000 iptable records on each worker
node, and this can make the kernel pretty busy.</p>
</blockquote>
<p>Example : <a href="https://blog.titanwolf.in/a?ID=00700-de778e7d-72e7-4515-b822-18844b104abd" rel="nofollow noreferrer">https://blog.titanwolf.in/a?ID=00700-de778e7d-72e7-4515-b822-18844b104abd</a></p>
<p><a href="https://dustinspecker.com/posts/ipvs-how-kubernetes-services-direct-traffic-to-pods/" rel="nofollow noreferrer">https://dustinspecker.com/posts/ipvs-how-kubernetes-services-direct-traffic-to-pods/</a></p>
<p>Question</p>
<blockquote>
<p>what is the use case of IPVS transport-layer load balancing?</p>
</blockquote>
<p>You can use the <strong>IPVS</strong> with <strong>external IP</strong> to expose the service running inside the K8s cluster instead of ingress.</p>
<blockquote>
<p>Can we use it for the east-west traffic between pods..?</p>
</blockquote>
<p>Yes, you can use it. You can run the <strong>kube-proxy</strong> in to the <strong>IPVS</strong> mode.</p>
<p>So Kube proxy has three modes <strong>userspace, iptables, or IPVS</strong></p>
<p>If i explain <strong>iptables</strong> VS <strong>IPVS</strong> in very simple words,</p>
<p>there is not much performance changes until you are running around <strong>1000</strong> services and <strong>10000</strong> PODs in the cluster. If you are operating at that level using the IPVS with Kube-proxy might can help you and improve performance.</p>
<p>If you aren’t sure whether IPVS will be a win for you then stick with kube-proxy in iptables mode. It’s had a ton more in-production hardening.</p>
<p>You can checkout this document for more : <a href="https://www.tigera.io/blog/comparing-kube-proxy-modes-iptables-or-ipvs/" rel="nofollow noreferrer">https://www.tigera.io/blog/comparing-kube-proxy-modes-iptables-or-ipvs/</a></p>
