Skip to main content
⎈K8sCalc
networking

What is HAProxy?

A high-performance TCP/HTTP load balancer and proxy. In Kubernetes setups, HAProxy is commonly used as a reverse proxy to terminate TLS and forward traffic to ingress controller NodePorts.

HAProxy explained

How it works. HAProxy is a high-performance TCP/HTTP load balancer and proxy. It distributes connections across backends with algorithms such as round-robin, leastconn or source hashing, and removes unhealthy backends with active health checks.

In practice on Kubernetes. HAProxy is often the load balancer in front of the API servers of a self-managed cluster (port 6443, TCP mode), paired with Keepalived for a floating virtual IP. The HAProxy Kubernetes Ingress Controller also runs as an ingress controller inside the cluster.

Common pitfalls. Health checks that only test TCP when the backend can be up but unhealthy; timeouts too short for long-lived connections (kubectl logs -f, websockets); one HAProxy instance as a single point of failure.

Related tool

K8s Cluster Cost

Calculate the monthly cost of running a self-managed Kubernetes cluster on Hetzner Cloud, Vultr, or DigitalOcean. Choose server types for control planes, workers, and load balancers with HA mode.

Related Calculators

Related Generators

Related Comparisons

Related Terms