Hacker News new | ask | show | jobs
by drewbug01 3798 days ago
HAProxy: http://www.haproxy.org/

The configuration language leaves much to be desired ... but it's otherwise a fantastic piece of software. It's the most configurable, full-featured, stable, and fast proxy server I've ever worked with.

1 comments

What does it have over nginx?
Depending on what you care about, either everything or nothing. Some interesting things I find useful:

* Multiple load-balancing schemes (round robin, least conn, first, balance-on-src-ip, balance-on-uri, balance-on-uri-param, balance-on-header-value, etc)

* Advanced health-checking (out of band, script-based, remote socket based, HTTP send/expect, etc)

* Really, really easy HTTP request and response manipulation

* Generic counter support - think something like "rate limit request based on the average number of requests over the last 5 minutes that all had this random URL param". That's a contrived example, but it's easy in HAProxy.

* Fantastic ACL support. You can even dynamically update them on the fly based on a response from an upstream server, if you so wanted. Not that you should, but you could.

Honestly, you can do most things you'd need in nginx these days. But HAProxy tends to do it just as well, and in a much, much more flexible manner. And in some ways, the ACL support and terseness of the configuration allows you to write out really complex behavior in ways that would be annoying or difficult in nginx.