Re: threading idea

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sat, 17 Mar 2001 14:27:48 +0100

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 Sat Mar 17 2001 - 06:28:06 MST

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