I often see setups of (Rails | Java | PHP | Node.js | nginx | etc..) where there are many instances of the webserver software (nginx, apache, mongrel, it doesn’t matter) running per server and serving the same application, instead of a single, “huge” instance.
Why would one choose such approach? It is not clear for me why many smaller instances serving the same application could be better than one instance tuned to use the max available ram and threads.
To make myself clear, I often see statements like “… we have 10 servers, running 20 instances of <some webserver> each”. Why not “10 server, running 1 instance of <some webserver> each”?
Running multiple instances of a webserver only makes sense if it is single-threaded (like node.js or mongrel) to take advantage of multiple CPU cores.