Why use haproxy now ?

Reinis Rozitis r at roze.lv
Thu Mar 28 15:20:45 UTC 2013

> There is backup servers, least_conn and other fancy things. Isn't it as 
> efficient as Haproxy (open question)?

The simple fact that you are not actually (externaly) able to tell if/how 
many backends are down should answer your question.

You also have to use third party modules for active health checks - the 
default Upstream considers a backend down only after failing (configured 
amount of times) actual client requests -  both varnish and haproxy allow 
you to avoid this by having such functionality in the core.

> As for varnish : if you are on a static html page, then it is your browser 
> cache that relays you. If it is semi static, chances are that you don't 
> reuse the same part several times among different users due to 
> personalization. And if you can split this sub part to serve something 
> general enough, then the time that it calls varnish to serve it, nginx 
> alone would have already done half the way to serve the file.

You cover only a part of "caching".

Besides parts of html  (which in my opinion using nginx with SSI is somewhat 
more complicated (due to single location/if limitations) than varnish ESI 
implementation though you can probably work arround it using the agentzh 
openresty module) varnish can just work as an accelerator for static 

While of course nginx can do the same again you have to use a third party 
module for cache invalidation (not saying it's a bad thing).
Also the cache residing 1:1 on the filesystem makes it problematic in setups 
where you have a lot of cachable objects. At least in my case the nginx 
cache manager process took way too much resources/io when traversing the 
directory tree with few milion files versus storing them all in a single 
mmaped file.

> Here is my scenario : I just nginx for just everyhting I have to deal 
> with.

Good for you, but what is the goal of your mail?

Don't get me wrong nginx is a stellar software and one of the best 
webservers but it doesnt mean it needs to do everything or sticked 
everywhere even the active community and the increasing ammount of modules 
(would) allow that :)


More information about the nginx mailing list