Nginx webserver
The Nginx webserver is a small, fast webserver with very small footprint. It is very good as a static content server as well as a webserver for low memory servers and as a reverse proxy. Nginx isn't based on threads or preforks, instead it was designed as an asynchronous event driven application. The main benefit is small memory footprint, however it also means that processes may be blocked by long running operations if you run things like
mod_perl or
mod_wsgi. So just avoid those things and let Nginx do what it was designed for: serving static files and reverse proxying (fastcgi and the likes included of course).
Pros:
- Modular design
- Small memory footprint, damn fast.
- Cache is very tweakable
- FastCGI module with optional caching
- Easy yet powerful rewrite configuration
- Fast caching module
- Has a "mirror store" for saving FastCGI responses as files (and serving them later instead of proxying requests)
- Has the essential features required for production webserver, feature-set is reacher then Lighttd's
- Zero downtime upgrade
- Userbase is growing fast, new modules are added every day
Cons:
- No dynamic module loading, recompilation needed to add modules
- Some features misbehave
- No mod_php, mod_perl is experimental, no cgi support (but who needs it anyway?)
- Forget about changing php/cgi behavior in specific locations, all setting must be done on the FastCGI backend - so you might need a few php-cgi process or just insert
ini_set in the app
- The documentation used to be pretty horrid, but there has been gradual improvement. The mailing list is a big help when in trouble.
- No digest authentication, limited number of auth backend (htpasswd files, pam), no group auth
- No user config files (.htaccess)
Quirks
Configuration tips
Application configurations
Benchmarks and testcases
TODO
--
AvishaiIshShalom - 02 Aug 2009