It's sounds like you love it, and I have had no experience with HAProxy. So I'm curious about the reasons you love it.
(Just to be clear this is a sincere question to learn since tone is hard to express clearly with text.)
It's sounds like you love it, and I have had no experience with HAProxy. So I'm curious about the reasons you love it.
(Just to be clear this is a sincere question to learn since tone is hard to express clearly with text.)
HAProxy gives you the following that are musts for load balancing (in my opinion), that NGINX does not, at least not easily:
1) A HTML (or JSON) stats page that precisely and completely tells you what’s going on at a high-level. A visit to this during outages is often all that’s required.
2) Support for DNS (and other) discovery mechanisms in a flexible way. (This is paid in NGINX)
3) Active health checks (also paid in NGINX)
4) The ACL system, while somewhat difficult to learn, is amazingly powerful.
5) Flexible L7 retries are brilliant.
We replaced NGINX with HAProxy and eliminated a whole class of bugs, micro-outages, and annoyances just by following HAProxy’s best practices.
I still use NGINX when I need a static web file server, though. :)
nginx - { static file serving, good proxy for python/ruby apps, req manipulation with advanced scripting capabilities via lua engine through open-resty [mirroring, WAF(naxsi), url rewriting etc] }
A combo of haproxy + nginx would always bring good delight for many practitioners.
All 3 components are free, combine extremely well because they've grown together, and are extremely efficient. This is important in virtualised or containerized environments where you want to save resources to minimize response time and leave the CPU for the applications.
Of course each of them can do a little bit of the other ones' job. This is fine, it allows easier initial deployments, but as your site grows, whichever you initially start with, you'll always end up installing the two other ones to constitute the most robust stack ever. And it's easy to insert one next to the others without having to break everything, which further adds to the fun.
It's great.
I'm sure they fixed the problem by now, but it was not a good look for a load balancer.
HAProxy on the other hand has never failed me, and Wily (the creator) is super responsive if you have questions or need features.
I see a lot of people preferring Nginx, but I can't understand why they are so fascinated about it and try to squeeze it where it has no place. Nginx is just a web server that has some load balancing functionality, it is sub par with HAProxy.
I never seen people saying why are you using HAProxy instead of Apache, but Nginx load balancing functionality is closer to Apache than HAProxy.
I will definitely checkout out HAProxy now.
HAProxy is such a great example of software that does what you expect, generally.
It's also rock solid and battle tested. I don't think I ever observed crash. It's typically one of tools that once you configure correctly it works for years without issues.
It got a lot better quickly, but running with thread was crashy with a lot of threads. I don't remember crashes with single threaded/forking mode though, and I ended up with a forking config when I was setting something up at my last job.
This is why I love HN. I ask a good question and get a lot of great feedback!