RE: Sequential sever?

From: Avi Saxena <avis@dont-contact.us>
Date: Tue, 28 Sep 1999 10:06:11 -0500

Thanks for the response. I have recently started looking in the squid code.

In main.c, we have a comm_poll that polls for icp and http requests
comm_poll_icp_incoming and comm_poll_http_incoming. It is doing this in a
loop and sequentially. We check for the requests on the fd's and if there is
one, we call the handler for that (sequentially). We do not call 2 handlers
at one time, i.e. * if one handler takes a long time other requests are
blocked for that time. * Is this correct? or am I missing soething. I am
using Linux. When should "HAVE_POLL" be undefined? What are the pros and
cons?

Thanks,

AS

> -----Original Message-----
> From: cougar [SMTP:cougar@telstra.net]
> Sent: Monday, September 27, 1999 10:42 PM
> To: Avi Saxena
> Cc: squid-users@ircache.net
> Subject: Re: Sequential sever?
>
> On Tue, 28 Sep 1999, Dancer wrote:
>
> > Avi Saxena wrote:
> > > I just started to look into Squid log files -- it appears that Squid
> is a
> > > sequential server i.e. handles only one request at a time -- it is not
> > > multi-threaded. Is it right?
>
> > That's both correct and incorrect. Squid can service many requests
> > simultaneously. From the point of view of the user, it's doing many
> > requests at once. From the point of view of the code, it's only ever
> > doing one thing at a time, but that's true in any multithreaded or
> > multitasking system.
> >
> > So it would not be true to say that squid handles 'only one request at a
> > time' from a broad perspective, since squid may be recieving data,
> > caching or delivering data for multiple users and multiple requests
> > without having to wait for any given request to terminate before another
> > can be handled.
>
> So, what we're really saying to you, Avi, is:
>
> "Why don't you rephrase the question in a way that demonstrates that you
> have an understanding of what the terms multi-user, multi-tasking,
> multi-threading mean, and get back to us with a question that _really_
> asks what you have in mind ...".
>
> Quickly, before you start any religous arguments!
>
> John.
>
> _______
> +------------------ //////// -----+----------------------------+
> | John V Cougar __ Big | Voice: 61 2 6208 1683 |
> | Cache Manager / / /\ Pond +----------------------------+
> | Telstra Internet \/_/ \ Direct | E-Mail: cougar@telstra.net |
> +--------------------____/ -------+----------------------------+
Received on Tue Sep 28 1999 - 09:26:48 MDT

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