<p>What is the difference between Nginx ingress controller and HAProxy load balancer in kubernetes?</p>

yasin lachini
<p>First, let's have a quick overview of what an <code>Ingress Controller</code> is in Kubernetes.</p>
<ul>
<li><strong>Ingress Controller:</strong> controller that responds to changes in <code>Ingress</code> rules and changes its internal configuration accordingly</li>
</ul>
<p>So, both the HAProxy ingress controller and the Nginx ingress controller will listen for these <code>Ingress</code> configuration changes and configure their own running server instances to route traffic as specified in the targeted <code>Ingress</code> rules. The main differences come down to the specific differences in use cases between Nginx and HAProxy themselves.</p>
<p>For the most part, Nginx comes with more batteries included for serving <em>web content</em>, such as configurable content caching, serving local files, etc. HAProxy is more stripped down, and better equipped for high-performance network workloads.</p>
<p>The available configurations for HAProxy can be found <a href="https://github.com/jcmoraisjr/haproxy-ingress#configuration" rel="nofollow noreferrer">here</a> and the available configuration methods for Nginx ingress controller <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/" rel="nofollow noreferrer">are here</a>.</p>
<p>I would add that Haproxy is capable of doing TLS / SSL offloading (SSL termination or TLS termination) for non-http protocols such as mqtt, redis and ftp type workloads.</p>
<p>The differences go deeper than this, however, and these issues go into more detail on them:</p>
<ol>
<li><a href="https://serverfault.com/questions/229945/what-are-the-differences-between-haproxy-and-ngnix-in-reverse-proxy-mode">https://serverfault.com/questions/229945/what-are-the-differences-between-haproxy-and-ngnix-in-reverse-proxy-mode</a></li>
<li><a href="https://stackoverflow.com/questions/21173496/haproxy-vs-nginx">HAProxy vs. Nginx</a></li>
</ol>
