Re: [httpbis] #432: Review Cachability of Status Codes WRT "Negative Caching"

Mark Nottingham <mnot@mnot.net> Mon, 18 February 2013 03:55 UTC

Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D908321F8B83 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 17 Feb 2013 19:55:16 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.393
X-Spam-Level:
X-Spam-Status: No, score=-9.393 tagged_above=-999 required=5 tests=[AWL=1.206, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7bGfjdUf9yZR for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 17 Feb 2013 19:55:16 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 0A94821F8B81 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 17 Feb 2013 19:55:16 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1U7Hnj-00080F-F6 for ietf-http-wg-dist@listhub.w3.org; Mon, 18 Feb 2013 03:53:59 +0000
Resent-Date: Mon, 18 Feb 2013 03:53:59 +0000
Resent-Message-Id: <E1U7Hnj-00080F-F6@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <mnot@mnot.net>) id 1U7HnS-0007zS-La for ietf-http-wg@listhub.w3.org; Mon, 18 Feb 2013 03:53:42 +0000
Received: from mxout-08.mxes.net ([216.86.168.183]) by maggie.w3.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from <mnot@mnot.net>) id 1U7HnR-0004wy-S9 for ietf-http-wg@w3.org; Mon, 18 Feb 2013 03:53:42 +0000
Received: from [192.168.1.80] (unknown [118.209.197.138]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 55046509B8; Sun, 17 Feb 2013 22:53:18 -0500 (EST)
Content-Type: text/plain; charset="windows-1252"
Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <51219570.3080504@treenet.co.nz>
Date: Mon, 18 Feb 2013 14:53:15 +1100
Cc: ietf-http-wg@w3.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <7471217E-D88B-47B4-93E7-C06DA1E78EE2@mnot.net>
References: <059.77033a1709a94099b974f5d7985e94b6@trac.tools.ietf.org> <1B168529-9ECB-4A4D-9EC2-190447DB6B72@mnot.net> <2B8C0176-F957-4B69-B264-99CF556BD858@mnot.net> <51219570.3080504@treenet.co.nz>
To: Amos Jeffries <squid3@treenet.co.nz>
X-Mailer: Apple Mail (2.1499)
Received-SPF: pass client-ip=216.86.168.183; envelope-from=mnot@mnot.net; helo=mxout-08.mxes.net
X-W3C-Hub-Spam-Status: No, score=-4.2
X-W3C-Hub-Spam-Report: AWL=-2.291, BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1U7HnR-0004wy-S9 acd726ea209b6f3c3f7f765d51b5cd8f
X-Original-To: ietf-http-wg@w3.org
Subject: Re: [httpbis] #432: Review Cachability of Status Codes WRT "Negative Caching"
Archived-At: <http://www.w3.org/mid/7471217E-D88B-47B4-93E7-C06DA1E78EE2@mnot.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/16660
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On 18/02/2013, at 1:44 PM, Amos Jeffries <squid3@treenet.co.nz> wrote:
>> 	• 502 (Bad Gateway)
>> 	• 503 (Service Unavailable)
>> 	• 504 (Gateway Timeout)
> 
> These ones are often temporary conditions and where we have the most trouble with Squid despite the automatic re-try of alternative routes. A short glitch in DNS or routing can trigger them and DoS the caches entire client base for an overly-large timespan. It often does make sense to cache them, but only for very short time (seconds at most) and not in caches outside of the device which generated them.
> 
> For devices with only one upstream route; the upstream outage is a problem for as long as the upstream sets cacheability on the reply.
> For devices with multiple upstream routes; the alternative routes may have shorter recovery times (mandatory decrease in cached time?) or be fully working for this request.
> 
> Either way I am against caching these set without explicit Expiry information being present.

I'm fine with that; was nervous about including them on that list in the first place.


> Note that I'm *not* proposing the following, even though they are negatively cached by some implementations, as I suspect doing so may cause interop problems:
>> 
>> 	• 400 (Bad Request)
>> 	• 403 (Forbidden)
>> 	• 500 (Internal Server Error)
>> 
>> Thoughts?
> 
> 403 Forbidden might be cacheable when a Vary:WWW-Authenticate is also in the reply

Sure, but if you set Vary, you can also set CC; this isn't a common use, and lots of people use 403 to mean "forbidden for ill-defined reasons", so using a heuristic would likely get them in trouble.

Cheers,


--
Mark Nottingham   http://www.mnot.net/