3 ms·
Why you chose Nginx over HAProxy? 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 wher
by takeda 6y ago
Why you chose Nginx over HAProxy?
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.
- apple4ever 6y agoI choose it because I have a lot of experience with Nginx, and none with HAProxy. So I set it up as a LB, and it worked for my needs (at least from what I can tell). I will definitely checkout out HAProxy now.
- heipei 6y agoI think people choose nginx because it does everything decently, even if it can't beat HAProxy for load-balancing or Varnish for caching (at least the FOSS nginx). I run a small-to-mmedium size application with multiple upstream (local web app tier, remote asset servers) and some basic vhost and caching use-cases, e.g. cache specific paths with different cache keys than others, different cache behaviours and life-times, request rate limiting, some local file serving. nginx does everything I need, without any additional modules. I get close enough to zero-downtime deployments by using multiple backends and proxy_next_upstream, haven't needed active healthchecks for the upstreams yet. I have JSON access logs, so my dashboard about vhost activity is in Kibana now. There are a few juicy features missing (cache PURGE, proxy request coalescing, extended stub status endpoint, JSON error log). Not trying to fanboy, but I wouldn't introduce additional complexity into my stack by running haproxy + varnish + nginx just to get the best of each tool, not at my current scale.