Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 39395 invoked from network); 28 Aug 2005 18:16:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Aug 2005 18:16:25 -0000 Received: (qmail 69722 invoked by uid 500); 28 Aug 2005 18:16:18 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 69700 invoked by uid 500); 28 Aug 2005 18:16:18 -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: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 69687 invoked by uid 99); 28 Aug 2005 18:16:18 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Aug 2005 11:16:18 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [64.49.223.165] (HELO chandler.sharp.fm) (64.49.223.165) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Aug 2005 11:16:33 -0700 Received: from localhost (localhost [127.0.0.1]) by chandler.sharp.fm (Postfix) with ESMTP id E4D4693218C; Sun, 28 Aug 2005 13:16:14 -0500 (CDT) Received: from chandler.sharp.fm ([127.0.0.1]) by localhost (chandler.sharp.fm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 17402-04; Sun, 28 Aug 2005 13:16:10 -0500 (CDT) Received: from [192.168.200.34] (firstmarine.cust-gw.jnb6.alter.net [196.31.24.162]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by chandler.sharp.fm (Postfix) with ESMTP id B02975F548A; Sun, 28 Aug 2005 13:16:08 -0500 (CDT) Message-ID: <4311FF70.3020101@sharp.fm> Date: Sun, 28 Aug 2005 20:16:16 +0200 From: Graham Leggett User-Agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@httpd.apache.org Cc: colm@stdlib.net Subject: Re: [PATCH] mod_disk_cache deterministic tempfiles References: <430398AA.2040609@sharp.fm> <43039A71.3080803@turner.com> <20050817202905.GA2131@stdlib.net> <90B3DD1F144DFDA5DB24334E@st-augustin.ics.uci.edu> In-Reply-To: <90B3DD1F144DFDA5DB24334E@st-augustin.ics.uci.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at wired.co.za X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Justin Erenkrantz wrote: >> For a disk cache it would be tricky to discern between a cached file >> that is half there due to a sudden httpd exit, and a cached file that is >> half there because a proxy or CGI backend is blocking. > Exactly. This is why I've avoided this functionality. I don't think it > can be implemented effectively or efficiently. I don't think this is a problem that needs complex error handling at all. In the current situation, if the backend stalls, one frontend client will stall. If the in flight cache object is shared, then if the backend stalls, more than one frontend client will stall. This is a lesser evil than the current behaviour, where thundering herd hits the backend every time a resource expires, which in the case of typical news sites, is once every sixty seconds. In both cases, at least one client will eventually get impatient and force reload that particular resource. This will invalidate the in flight object, and the cache process is retried again. If the proxy gets impatient and times out the backend, it will invalidate the in flight object, and signal to the frontend to close the connections. The clients will simply try refetch the object, something they would have to do anyway. > I absolutely dislike the idea of stalling a request because another > worker/thread *might* be fetching it. We should never purposely stall a > request because another worker *might* have a request outstanding. In this case it's not "might", it's "almost always". Any connection already faces the very small possiblity that it might hang. That very small possiblity increasing in chance by a few simultaneous connections is still a minimal risk than the certainty of thundering herd. Regards, Graham --