What is HAProxy and when would you pick it over nginx?
IntermediateProductionLoad Balancing, Proxies & nginx in Production
Answer
A high-performance TCP and HTTP load balancer with advanced health checks, stick tables for rate limiting and session tracking, ACLs, runtime API, and detailed stats. Pick it when load balancing is the whole job: database proxies, TCP services, complex routing and observability needs.
frontend fe
bind :443 ssl crt /etc/haproxy/certs/
default_backend app
backend app
balance leastconn
option httpchk GET /health
server a 10.0.1.10:8080 check inter 2s fall 3 rise 2
More on Load Balancing, Proxies & nginx in Production
How do you choose between ALB, NLB and an nginx or Envoy fleet?IntermediateHow do you tune ALB idle timeout and backend keep-alive to avoid 502s?IntermediateWhich nginx directives matter most for a production reverse proxy?IntermediateHow do you do rate limiting and abuse protection in nginx?IntermediateHow do you achieve zero-downtime configuration reloads in nginx and HAProxy?IntermediateHow would you design a highly available load-balancing tier on-prem or in a colo?Advanced