From owner-freebsd-hackers Tue Feb 19 16:44: 8 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from chiark.greenend.org.uk (chiark.greenend.org.uk [212.22.195.2]) by hub.freebsd.org (Postfix) with ESMTP id 8258937B402 for ; Tue, 19 Feb 2002 16:43:55 -0800 (PST) Received: from fanf by chiark.greenend.org.uk with local (Exim 3.12 #2) id 16dKrF-0004q6-00 (Debian); Wed, 20 Feb 2002 00:43:41 +0000 Date: Wed, 20 Feb 2002 00:43:41 +0000 From: Tony Finch To: Dominic Marks Cc: Peter Wemm , Mike Silbersack , Hiten Pandya , freebsd-hackers@FreeBSD.ORG Subject: Re: In-Kernel HTTP Server (name preference) Message-ID: <20020220004341.A17928@chiark.greenend.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0.1i In-Reply-To: <20020219092058.A78717@host213-123-131-110.in-addr.bto> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Dominic Marks > > http://www.acme.com/software/thttpd/notes.html on the section > regarding non-blocking I/O: > > "The fourth generation. One process only. No non-portable threads/LWPs. > Sends multiple files concurrently using non-blocking I/O, calling > select()/poll()/kqueue() to tell which ones are ready for more data. > Speed is excellent. Memory use is excellent. Portability is excellent. > Examples of this generation: Spinner, Open Market, and thttpd. Perhaps > Apache will switch to this method at some point. I really can't > understand why they went with that complicated pre-forking stuff. > Using non-blockijng I/O is just not that hard." Apache-2.0 will use a combination of in-process threading and pre-forking by default, but the IO architecture has some scope for adding non-blocking IO in the future. The reasons for preforking are that it makes programming server extensions much easier, especially when you consider things like database libraries that don't provide a non-blocking API, etc. (Other bits of Apache are designed to be simple, like the memory management.) Another thing in preforking's favour is that it makes the server as a whole MUCH more robust -- a child process can blow up without taking down the server -- and again this has advantages with unreliable server extensions. Tony. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message