Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nginx ingress controller vs HAProxy load balancer

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

like image 484
yasin lachini Avatar asked Mar 14 '19 15:03

yasin lachini


People also ask

What is the difference between Nginx and HAProxy ingress controller?

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.

What is ingress load balancer?

Ingress Controllers for NGINX and NGINX Plus Before we deploy the sample application and configure load balancing for it, we must choose a load balancer and deploy the corresponding Ingress controller. An Ingress controller is software that integrates a particular load balancer with Kubernetes.

What is Nginx load balancing?

NGINX Load Balancing NGINXclaims to be a high-performance reverse proxy and load balancer. As of August 2018, it serves 25.03% of traffic of the top 1 million websites.

How do I configure load balancing for microservices applications with ingress?

You can choose any load balancer that provides an Ingress controller, which is software you deploy in your cluster to integrate Kubernetes and the load balancer. Here we show you how to configure load balancing for a microservices application with Ingress and the Ingress controllers we provide for NGINX Plus and NGINX.


1 Answers

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.

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
like image 155
Monkeyanator Avatar answered Sep 19 '22 14:09

Monkeyanator