Apache with mod_jk served as a load balancer, but with increasing traffic we looked for a better solution. HAProxy is the de facto standard — fast, reliable and with excellent configurability.
Why HAProxy¶
Better health checks, detailed statistics (real-time dashboard), lower resource footprint, better sticky session management. A dedicated load balancer vs. a web server with LB functionality.
Configuration¶
Frontend, backend, health check on the /health endpoint. Sticky sessions via the SERVERID cookie. Automatic failover.
Zero-downtime deployment¶
Rolling deployment: take server A out of the pool, upgrade it, put it back, then server B. CLI: set server state drain.
Conclusion¶
HAProxy is an excellent load balancer. The stats dashboard and CLI enable the operational flexibility that Apache doesn’t offer.
Need help with implementation?
Our experts can help with design, implementation, and operations. From architecture to production.
Contact us