nginx vs HAProxy

LB choice.

Overview

nginx and HAProxy are two long-standing load balancers with different design centres. nginx is a web server that also load-balances (rich HTTP feature set, static-file serving, reverse-proxy plus LB in one); HAProxy is a pure load balancer (deeper traffic-management primitives, more advanced health checks, lower memory footprint). The right answer depends on whether the workload needs combined web-server-plus-LB or focused LB.

The approach

Workload-driven choice, per-team operational fit considered, documented rationale per tier. The discipline is making the LB choice once with a written reason rather than running both tools at the same tier.

Why this compounds

The right LB choice compounds across years. Config patterns and team expertise align with the tool; cross-tier tooling (health-check templates, observability, deploy automation) gets built once and reused. By year two the LB choice is automatic per tier.