A faster Web server: ripping out Apache for Nginx

Found on Ars Technica on Sunday, 13 November 2011
Browse Software

Nginx (pronounced "engine-ex") is a lightweight Web server with a reputation for speed, speed, speed. It differs from Apache in a fundamental way—Apache is a process- and thread-driven application, but Nginx is event-driven. The practical effect of this design difference is that a small number of Nginx "worker" processes can plow through enormous stacks of requests without waiting on each other and without synchronizing; they just "close their eyes" and eat the proverbial elephant as fast as they can, one bite at a time.

For larger websites, it's often employed as a front-end Web server to quickly dish up unchanging page content, while passing on requests for dynamic stuff to more complex Apache Web servers running elsewhere.

Nginx is without any doubt worth a look. Tied together with Apache's webserver it can speed up things a lot by taking off load thanks to it's caching abilitites. It's surprisingly easy to set up, even if you want to load balance incoming traffic between multiple backends where the requests also should be filtered by type. Set up the cache in RAM and you'll see Apache's workers with less load.