3 ms·
HaProxy does load balancing better, it never was a primary feature of nginx. Varnish can do the caching. Apache/Lighttpd can serve files and CGI, but maybe not
by user5994461 8y ago
HaProxy does load balancing better, it never was a primary feature of nginx. Varnish can do the caching. Apache/Lighttpd can serve files and CGI, but maybe not as efficiently.
Apache is really struggling on resource consumption. It's still living in the world of one process or one thread per connection.
Operationally it always ends up in a clusterfuck of rewrite rules and there are many gotchas with undocumented and misbehaving directives.
- regecks 8y ago>It's still living in the world of one process or one thread per connection Not exactly - you choose the event MPM (mod_http2 won't even run with prefork MPM).
- jimjag 8y ago"It's still living in the world of one process or one thread per connection." It hasn't lived in that world for a decade or so. It's great to give advice, but at least make it valid and factual. With the Apache 2.4 event MPM, httpd is async and event-driven and is just as fast as nginx.
- user5994461 8y agoApache is full of gotchas as stated. For one, the event MPM is not async :p It's still creating multiple processes that get recycled periodically, each with a fixed number of threads. Every active request holds a thread. Apache quickly runs into troubles when having long lived requests (slow API calls or large file downloads) or when using websockets (hold a thread permanently). The tuning to balance processes, threads, connections, requests and resource consumption is extremely complicated and it doesn't get very far. HAProxy and nginx can both handle 10k concurrent connections out of the box. Apache requires extensive tuning before 1k.