Re: threading idea

From: Brian Degenhardt <bmd@dont-contact.us>
Date: Mon, 19 Mar 2001 09:59:13 -0800

It might be useful to use the apache project as an example and attmept to
support all models. I may have my details a little screwed up, but the
apache 2.0 architecture has what they call an MPM which an abstract model
for spawning handler thread/processes for requests. The way it's designed
you can have multi-process MPM's or multi-threaded MPM's or a hybrid of
both. You can also write your own MPM that takes use of your target
operating system's threading model, or perhaps use State Threads.

-bmd

On Sat, Mar 17, 2001 at 02:27:48PM +0100, Henrik Nordstrom wrote:
> Robert Collins wrote:
> >
> > I'm new to looking at this in the context of squid - What are the
> > tradeoffs (or the archive threads pre mid 2000) that make multi process
> > "better" than multi thread? It seems to me that handling memory across
> > threads is easier and more portable than efficient shared memory across
> > process's.
>
> The point is that there is very little data that needs to be shared
> between two different requests, and having a multi-process design is a
> hell lot easier to debug as you know there is nothing shared except what
> is explicitly shared.
>
> Also, a multi-process design gains in stability. If there is a fatal
> error in request processing then it only hits those requests processed
> by the same process. Requests processed by other processes can keep on
> as if nothing happened. This is also true if you need to restart
> components. Simply start a new request processor and gently shut down
> the old one. The more you scale up the system the more important this
> gets.
>
> /Henrik
>
Received on Mon Mar 19 2001 - 10:59:15 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:13:39 MST