3 ms·
The big win of lighttpd/nginx is that they're single-process [1] multiplexing servers. Apache spawns dozens (or hundreds) of processes/threads and relies on the
by staunch 19y ago
The big win of lighttpd/nginx is that they're single-process [1] multiplexing servers. Apache spawns dozens (or hundreds) of processes/threads and relies on the OS to distribute resources. This critical difference is why they're so much more efficient and generally faster. The epoll mechanism in Linux has widened the gap even further.
Brad Fitzpatrick created a software load balancer in Perl that handles all the requests for LiveJournal based on this principle.[2]
1. A small number of processes may be used to take advantage of multi-processor machines.
2. http://danga.com/perlbal/ http://danga.com/perlbal/