“I bought this guide a few days ago to prepare for my interview with Oracle. Many of the questions they asked me were from this guide. I found this book absolutely great!”
Because if you have a high performance webserver handling thousands of requests, if each of them spawns a new process this creates a lot of overhead. Threads are cheaper.
The reason you use a multi-process web server is for robustness in the face of failure. On a multithreaded server one thread can wipe out all the rest when it crashes the server. In a multi-process server only the offending process goes down. As far as speed is concerned most multi-process servers allow you to spawn at the begining any number of processes to handle requests so speed differences on a running system are not much different between multi-threading and multi-process servers.
Because if you have a high performance webserver handling thousands of requests, if each of them spawns a new process this creates a lot of overhead. Threads are cheaper.
The reason you use a multi-process web server is for robustness in the face of failure. On a multithreaded server one thread can wipe out all the rest when it crashes the server. In a multi-process server only the offending process goes down. As far as speed is concerned most multi-process servers allow you to spawn at the begining any number of processes to handle requests so speed differences on a running system are not much different between multi-threading and multi-process servers.
Leave an Answer/Comment