yasin lachini
yasin lachini

Reputation: 5976

Nginx ingress controller vs HAProxy load balancer

What is the difference between Nginx ingress controller and HAProxy load balancer in kubernetes?

Upvotes: 12

Views: 13580

Answers (1)

Monkeyanator
Monkeyanator

Reputation: 1416

First, let's have a quick overview of what an Ingress Controller is in Kubernetes.

  • Ingress Controller: controller that responds to changes in Ingress rules and changes its internal configuration accordingly

So, both the HAProxy ingress controller and the Nginx ingress controller will listen for these Ingress configuration changes and configure their own running server instances to route traffic as specified in the targeted Ingress rules. The main differences come down to the specific differences in use cases between Nginx and HAProxy themselves.

For the most part, Nginx comes with more batteries included for serving web content, such as configurable content caching, serving local files, etc. HAProxy is more stripped down, and better equipped for high-performance network workloads.

The available configurations for HAProxy can be found here and the available configuration methods for Nginx ingress controller are here.

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.

The differences go deeper than this, however, and these issues go into more detail on them:

  1. https://serverfault.com/questions/229945/what-are-the-differences-between-haproxy-and-ngnix-in-reverse-proxy-mode
  2. HAProxy vs. Nginx

Upvotes: 15

Related Questions