As I design, build and sell load balancers based on LVS and HAProxy, it’s in my interests to combat the avalanche of NGINX+ marketing propaganda that I've seen over the last year. Let's call it an attempt to skewer fake news.
Why am I writing this now? Well, they got on my nerves when they rewrote the start of this book about the awesome NGINX web server — which 60 million people use — to be about load balancing. A convenient bit of marketing, given that only a few thousand people use their load balancer.
To be honest I'm a little bit envious — I wish I had the marketing clout that commercial NGINX+ has with Google, O’Reilly and Gartner.
HAProxy beats NGINX. Hands down.
NGINX is a great open source web server, we all know that. But I think after 15 years in this industry I can justify voicing an honest opinion.
NGINX next to HAProxy looks like a 2CV next to a Tesla: why would you drive a relic when you could have something that’s fast, finely tuned and headed into the future?
(No offense intended to anyone who likes 2CVs. Actually, I quite like the fact a 2CV is so easy to understand and maintain, but it's no Tesla…)
When should you use NGINX for load balancing?
- When you are already using NGINX and have basic requirements.
- If you've already used it before and are happy with it.
If you are already using NGINX in your environment and just need a simple load balancer, then go ahead and use NGINX as a reverse proxy as well. It's perfectly functional, reliable and scalable.
But if you need a real load balancer, with high availability, monitoring and full application delivery functionality then use HAProxy.
Why should you use HAProxy for load balancing?
- Because everyone else does — the best solution is number one.
- It's been tried and tested by thousands of people in all sorts of circumstances.
- It has 98% of the functionality you would ever need.
- It’s been improved and debugged by a large, active open source community.
- It was designed from the start for high performance load balancing.
- IPV6, PROXY PROTOCOL, TRANSPARENT PROXY, SSL & SNI, HTTP2, API, LUA Scripting, RDP connection broker, Stick tables, multi-node session replication, DDOS & DOS protection...
I could go on, but I think you get the point!
The problem with commercial NGINX+
Commercial NGINX+ is a great product. The company is well-funded and growing rapidly. It's clearly targeting the cloud and dev ops market (like Avi Networks). I'm sure it has fantastic support — and the product is going through very rapid development and improvement.
But. Commercial NGINX+ has a clear conflict of interest with the open source NGINX load balancer.
They don't make any effort to hide this fact:
"NGINX Plus has exclusive production‑ready features on top of what's available in the open source offering, including session persistence, configuration via API, and active health checks."
The best way to ensure product breadth, depth and quality of a platform is to work with the open source community in a productive and open manner.
NGINX does this for its excellent and widely loved web server - so why intentionally cripple its open source load balancer?
HAProxy does not seem to have this inherent conflict of interest with its commercial offering. In fact, I'm sure Willy Tarreau's investors wish he was slightly less committed to the open source purity of the product.
Do I blame NGINX inventor Igor Sysoev?
Hell no — good luck to him.
But I do reserve the right to speak my mind.