Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 53920 invoked from network); 2 Feb 2005 17:38:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 2 Feb 2005 17:38:04 -0000 Received: (qmail 65054 invoked by uid 500); 2 Feb 2005 17:37:59 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 64923 invoked by uid 500); 2 Feb 2005 17:37:59 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 64910 invoked by uid 99); 2 Feb 2005 17:37:59 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from force-elite.com (HELO utopia.in.force-elite.com) (216.255.199.145) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 02 Feb 2005 09:37:57 -0800 X-AuthUser: chip@force-elite.com Received: from [192.168.201.19] (67.160.57.179:51142) by utopia.in.force-elite.com with [XMail 1.17 (Linux/Ix86) ESMTP Server] id for from ; Wed, 02 Feb 2005 09:37:53 -0800 Message-ID: <42010FF1.4090603@force-elite.com> Date: Wed, 02 Feb 2005 09:37:53 -0800 From: Paul Querna User-Agent: Mozilla Thunderbird 1.0 (Macintosh/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Multi-threaded proxy? was Re: re-do of proxy request body handling - ready for review References: <4200EA25.7040105@remulak.net> <1107365560.4590.17.camel@dragon.cnet.cnwk.com> In-Reply-To: <1107365560.4590.17.camel@dragon.cnet.cnwk.com> X-Enigmail-Version: 0.89.6.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Ronald Park wrote: > I was recently considering a similar patch for mod_proxy along the lines > of spool_reqbody_cl() method but it would go one step further: spawning > off a thread to asynchronously read the request into a temp file (or > files) while the initial thread would continue to stream the io_bufsize > chunks down the filter chain. This would 'untie' the original client > and the proxy server in cases where they ran at different speeds (more > a problem for *large* proxy files where one side or the other could be > tied up waiting for the slower side for long periods of time... and > poor Apache caught in the middle). > One thought I have been tossing around for a long time is tying the proxy code into the Event MPM. Instead of a thread blocking while it waits for a backend reply, the backend server's FD would be added to the Event Thread, and then when the reply is ready, any available worker thread would handle it, like they do new requests. This would work well for backend servers that might take a second or two for a reply, but it does add at least 3 context switches. (in some use cases this would work great, in others, it would hurt performance...) -Paul