About HAProxy
HAProxy is a GPL-licensed load balancer and proxy for TCP and HTTP traffic. It terminates TLS, speaks HTTP/2 and HTTP/3, checks backend health, routes with ACLs, tracks clients in stick tables, and changes servers at runtime through its API.
A load balancer belongs on fast networking with spare headroom. CloudSat servers have 40 Gbps host uplinks and DDoS filtering, and a floating IP ($2.00/mo) can be moved to a standby HAProxy from the console if the primary fails.
Ubuntu 24.04 LTS runs HAProxy as the haproxy service, configured in /etc/haproxy/haproxy.cfg.
What you get with HAProxy
- Layer 4 and layer 7 load balancing
- TLS termination with HTTP/2 and HTTP/3 over QUIC
- Active health checks and failover between backends
- ACLs, stick tables and rate limiting
- Stats page and a Runtime API for live changes
HAProxy use cases
- Spreading web traffic across several app servers
- TLS offload in front of APIs and databases
- Blue-green and canary releases by weighting backends
After you deploy HAProxy
- Once the console shows Running, SSH in and open
/etc/haproxy/haproxy.cfgto define frontends and backends. - Validate every edit with
haproxy -c -f /etc/haproxy/haproxy.cfgbefore applying it. - Apply changes with
systemctl reload haproxy, which keeps established connections alive. - Expose the stats page only on a private port or behind authentication, and open just your frontend ports in the CloudSat firewall.
HAProxy ports
Open these in your firewall if you use one: 80/tcp HTTP, 443/tcp HTTPS, 443/udp HTTP/3 (if enabled).
HAProxy FAQ
Does HAProxy handle non-HTTP traffic?
Yes. In TCP mode it balances any TCP service, such as PostgreSQL, Redis or SMTP, with health checks, while HTTP mode adds header-aware routing, compression and caching rules.
How do I avoid a single point of failure?
Run two HAProxy servers with the same configuration and keep the public address on a floating IP. If the active one fails, move the floating IP to the standby in the console.
Disclaimer. The HAProxy project has no affiliation with CloudSat and does not endorse it. Names and logos belong to their owners and appear only to identify the software.