"Daniel C." <[EMAIL PROTECTED]> writes: > Apache does this iirc, and it seems to work fairly well. > > Or am I confusing threads and processes?
Depends on which version of apache you're talking about. Due to the short-lived nature of http requests, you can get a lot of web hits without having too many of them be simultaneous, especially if you are serving small static files like html files and small images. Thus, apache almost never needs to have a couple hundred threads running, much less hundreds of thousands. A MUD, on the other hand, has long-lasting persistent connections. If there are 1000 users connected and each has a thread, there will be a lot of threads! The threaded *style* of programming has its advantages (as well as a lot of disadvantages), but the *implementation* that maps each thread to a kernel-level process structure with a unique data stack does not mix well with massively multithreaded applications due to the heavyweight nature of those threads. For an example of what I'm talking about, see this page: http://www.sics.se/~joe/apachevsyaws.html in which apache 2 and yaws (a webserver written in Erlang, which implements its threads based on a select()-style event loop) face off against what amounts to a DOS attack. You'll see that apache falls over and dies completely LONG before yaws does. I would expect something like Lightthpd to perform similarly to yaws in a comparison like this, since it also uses an event-driven model. --Levi /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
