Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What are the differences between HAProxy and Nginx when it comes to their abilities as a reverse proxy?

share|improve this question
up vote 27 down vote accepted

HAProxy is really just a load balancer/reverse proxy. Nginx is a Webserver that can also function as a reverse proxy.

Here are some differences:


  • Does TCP as well as HTTP proxying (SSL added from 1.5-dev12)
  • More rate limiting options
  • The author answers questions here on Server Fault ;-)


  • Supports SSL directly
  • Is also a caching server

At Stack Overflow we mainly use HAProxy with nginx for SSL offloading so HAProxy is my recommendation.

share|improve this answer

I use nginx to frontend HAProxy, but only for SSL termination.

HAProxy is a much more tunable and manageable load balancer (in my experience).

I also incorporate Varnish for static object caching. (as a specific backend of HAProxy)

See this Server Fault question for more info. Ordering nginx/varnish/haproxy

share|improve this answer
The newest (September 2012) unstable builds of HAProxy now support SSL. (potentially removing my need to run nginx) – Joel K Oct 1 '12 at 0:12

If needed only for load balancing HA proxy is better. But combining both nginix and HA proxy can be more useful, as nginix is fast in providing static content, it will serve all request for static data and then send all request to HA proxy which serve as load balancer and send request to web server to serve request by balancing load.

share|improve this answer

nginix. Because there is no Haxproxy.

But seriously I think Haproxy makes a better load balancer while nginix would make a better caching server. If you only want availability haproxy is your choice. If you want to increase performance go with nginix.

share|improve this answer
Haxproxy sounds better somehow :-) – Joris Feb 3 '11 at 8:14
I think you mean "nginx" (engine x), not "nginix" – Jesper Mortensen Feb 8 '11 at 0:38
> "nginix. Because there is no Haxproxy." I was looking up irony and somehow it sent me here. – Forest Feb 10 at 6:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.