Re: Cache varying on particular cookies

Jeremy Roman <jbroman@chromium.org> Wed, 03 April 2024 21:11 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=ietf.org@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 0C226C15108C for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 3 Apr 2024 14:11:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.927
X-Spam-Level:
X-Spam-Status: No, score=-7.927 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.08, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=w3.org header.b="jjEdIK9J"; dkim=pass (2048-bit key) header.d=w3.org header.b="COW92CWM"; dkim=pass (1024-bit key) header.d=chromium.org header.b="M+WyI17M"
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 47iQ5ls-qAwG for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 3 Apr 2024 14:11:38 -0700 (PDT)
Received: from mab.w3.org (mab.w3.org [IPv6:2600:1f18:7d7a:2700:d091:4b25:8566:8113]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C0DD2C15107C for <httpbisa-archive-bis2Juki@ietf.org>; Wed, 3 Apr 2024 14:11:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=w3.org; s=s1; h=Subject:Content-Type:Cc:To:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To; bh=JOxu84gYwXGpD32CWIS8hQT2H3WGCGe0cEpqMJYctSg=; b=jjEdIK9JrQoAXNmSWvoLkI64V/ Ab96wcci/FSz8WqrgRLqm0IIAxvZUTMZ0ewVaJZSSLsexTriC9YeDifVWoWnY2XJwDJ1KgvMtduCw b8aQBDTjY+Lsj0zp/lOKz1UF4RVCmYGpTValzduXR967dufZh5BKL0NMAXJNflNzvO1shBmb1YXL/ h+vMzWMLAZM4/Pm+0cC1utXScjItIIH5jrSKd5LRec++E3nZwIUTFQpJRhbMN6mU8F0C2ht7sjz14 zunlBNLsaKBqq+26nD6tvO3i9aDZBPovtumrssggEwYlvXX8GxT8Xxn15O4hu5tvY+qwpHgSsAwXi sarGYOPQ==;
Received: from lists by mab.w3.org with local (Exim 4.96) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1rs7sS-002mSg-2V for ietf-http-wg-dist@listhub.w3.org; Wed, 03 Apr 2024 21:10:36 +0000
Resent-Date: Wed, 03 Apr 2024 21:10:36 +0000
Resent-Message-Id: <E1rs7sS-002mSg-2V@mab.w3.org>
Received: from ip-10-0-0-144.ec2.internal ([10.0.0.144] helo=pan.w3.org) by mab.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from <jbroman@chromium.org>) id 1rs7sR-002mRj-11 for ietf-http-wg@listhub.w3.org; Wed, 03 Apr 2024 21:10:35 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=w3.org; s=s1; h=Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To; bh=JOxu84gYwXGpD32CWIS8hQT2H3WGCGe0cEpqMJYctSg=; t=1712178635; x=1713042635; b=COW92CWM7EGAigzuLPni1NOvdXqSwi/XVLUiXwtnArIcuZ0TcLgcglD/PqTRaoGWSlyrs0GjOCy lQ7xBlqNtIvY3KrOL4zAE2ehRu4O2ljoT0H2efvgtiyU6Cw8+dxvqdKpeeo3P3bMBv9m/Bi2Z6guW JdJVZDa6bEAcZ4Kr1TV2jgU7MPPzwMbjxGFyaipfhgel756FhAeEAv+x/L1stocOBp9pWJMhrDoCJ 4X3pFZnPlkHeU4nRuHd/2oYt0E60fGjfxKPDQY4OHMpwkX53GqtwprPnhjTWn4frY7GsBaTvJBVBj 00olgDSscpQuBp8H+HR2iEpBHuXL+EVechhA==;
Received-SPF: pass (pan.w3.org: domain of chromium.org designates 2a00:1450:4864:20::632 as permitted sender) client-ip=2a00:1450:4864:20::632; envelope-from=jbroman@chromium.org; helo=mail-ej1-x632.google.com;
Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by pan.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from <jbroman@chromium.org>) id 1rs7sQ-005pUE-1E for ietf-http-wg@w3.org; Wed, 03 Apr 2024 21:10:35 +0000
Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a46a7208eedso44548966b.0 for <ietf-http-wg@w3.org>; Wed, 03 Apr 2024 14:10:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1712178630; x=1712783430; darn=w3.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=JOxu84gYwXGpD32CWIS8hQT2H3WGCGe0cEpqMJYctSg=; b=M+WyI17Mhwv4d1HQAFwYZdzAzEkqcgocO2m12uCVjtHfBrmgICPgMgCQXVm8QTdaOY C7DirgrEUflmzC4IHB7iTzubbmnBeQaOvrw9QYmQFDUzfjx2nNzcoHa/bhbZrlrGMSpx ieGW1xQ5J3HxwfDciBdGD9yO6W1XueU2j4Kpg=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712178630; x=1712783430; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JOxu84gYwXGpD32CWIS8hQT2H3WGCGe0cEpqMJYctSg=; b=G4AUYL2Ub39KJWluV4Lt54ny0W+gfcx+lJTRX2UBio7RkQ3ejFkeh/tQF2jd4HD/tQ 4eOKIODOxjIIqogiNW1hoz/p++hyBxSh722SElJqRe42atJZ+zvYsCUV2SGxt8AmJ47Z JjgyJVmKXzymYEVPfAdXwlrRzfgGZT6vf/CD5SB2rKjGOq+7oKP2ghg20wCWYqz+ZFj6 mYVCglGEk6ironUntBhpE44ATLZV7JwWPAqqlZlN99iP4Bi+iS23Nyqo+6DX/ztYggZo RdTKThMjwTpyRnJJML+V1xnVRoY9sDgw2YQOLGMbRJkpDiji6cPDZbIz/CZ3JYPAveZC z4xA==
X-Forwarded-Encrypted: i=1; AJvYcCV1lBz2+tEOs1GGIieuSi3dYvTAyDgdKTCNjmPVMojLQ2tUJ6ci5XR/4AF6BvDlB3DkN7Q5qHkqZkU3hXDY/eIZxYkS
X-Gm-Message-State: AOJu0Yzicx1BhwGhb5g4naaTIJ/ARg0K7HTJBNOFEL4lGtyOOkuw3DtK FKs5ogjOPeNzOFD1OaGOoRYPU7M3EqSkMph9lWvRhwK/N/ri76X6tP6Hc5nJdkm6V+nZ+shu102 ToWmb1XTVrWboeeF5mzNk+e007jpKQerX1kYo
X-Google-Smtp-Source: AGHT+IFwMOmi8F+PKeH5xKfsuOfoX1tUAjarChOaMxISE9uro7oxvp/Vgw2qgkrGBsjHeeXFf55NDkKhtsR3ZsOBVwg=
X-Received: by 2002:a17:907:7dab:b0:a4f:28c0:808e with SMTP id oz43-20020a1709077dab00b00a4f28c0808emr342873ejc.52.1712178630352; Wed, 03 Apr 2024 14:10:30 -0700 (PDT)
MIME-Version: 1.0
References: <CACuR13fgnfN3ENOQxFWaJH0YiG1GoM4T722D6MHNjNWfKD8WEg@mail.gmail.com> <9730212B-8166-4A8C-BB79-77939B1E3DBB@mnot.net> <CAOoMnrjikOOw98sh4VKVaTF7B_4CJHSTcefmJMvyoGzktZo+Pg@mail.gmail.com> <92F71D70-F1B5-4186-ACDD-3FA1427A9607@mnot.net>
In-Reply-To: <92F71D70-F1B5-4186-ACDD-3FA1427A9607@mnot.net>
From: Jeremy Roman <jbroman@chromium.org>
Date: Wed, 03 Apr 2024 17:10:17 -0400
Message-ID: <CACuR13e2wktvaZWDTRP5_-6SUPPfsr-FPLU7QLjk=bjyC7Fotw@mail.gmail.com>
To: Mark Nottingham <mnot@mnot.net>
Cc: Robin Marx <marx.robin@gmail.com>, ietf-http-wg@w3.org
Content-Type: multipart/alternative; boundary="0000000000000df7cf061537a7cf"
X-W3C-Hub-DKIM-Status: validation passed: (address=jbroman@chromium.org domain=chromium.org), signature is good
X-W3C-Hub-Spam-Status: No, score=-4.1
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, DMARC_PASS=-0.001, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: pan.w3.org 1rs7sQ-005pUE-1E 57834cc7ac22b471d8fb76775f8e5edf
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Cache varying on particular cookies
Archived-At: <https://www.w3.org/mid/CACuR13e2wktvaZWDTRP5_-6SUPPfsr-FPLU7QLjk=bjyC7Fotw@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/51913
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: <https://www.w3.org/email/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On Fri, Mar 15, 2024 at 1:09 AM Mark Nottingham <mnot@mnot.net> wrote:

> Hey Robin,
>
> I don't think that cache groups are a good solution for this, because they
> require a separate invalidation to be sent to the cache -- requiring not
> only latency but also for the origin to know where the cache is. The merit
> of availability hints in this situation is that all of the necessary
> information is already available to the cache.
>
> Cheers,
>
>
> > On 14 Mar 2024, at 20:08, Robin Marx <marx.robin@gmail.com> wrote:
> >
> > Hello Jeremy,
> >
> > I'm part of the team at Akamai behind the "awkward workarounds" post you
> shared :)
> > We obviously also agree something like this is needed and would like to
> collaborate both inside and outside of the IETF to further this.
> >
> > We were originally also looking mostly at the Availability Hints draft,
> but see there's also ongoing work around "cache groups" (i.e.,
> https://www.ietf.org/archive/id/draft-ietf-httpbis-cache-groups-01.html).
> > This seems like a potential alternative; if affected pages for example
> by default get a cache-group of "not-logged-in" and then the server sends
> Cache-Group-Invalidation: "not-logged-in" upon successful login, this might
> give the expected behaviour
> > (though, arguably, in a workaround-y way maybe? and it seems some
> normative language in the current draft maybe isn't optimal for this use
> case).
> > It might also run into similar performance issues as we've seen with
> Clear-Site-Data: "cache" (see
> https://calendar.perfplanet.com/2023/rli/#clear_site_data_header), but
> still, a potential alternative to consider.
> >
> > Potentially we might prepare something to present at IETF 120 to help
> further discussion / bring it to the wider wg's attention?
>

Sounds reasonable; hopefully we're further along on the Chrome side, too,
by July.

> With best regards,
> > Robin
> >
> >
> > On Thu, Mar 14, 2024 at 4:18 AM Mark Nottingham <mnot@mnot.net> wrote:
> > Personally, I'm supportive, but that's probably not surprising :)
> >
> >
> > > On 21 Feb 2024, at 13:08, Jeremy Roman <jbroman@chromium.org> wrote:
> > >
> > > Hello HTTPWG:
> > >
> > > I'm working on speculative loading in Google Chrome (most saliently,
> prefetch of documents for navigation) and looking at ways to address the
> potential problem of prefetched resources becoming "stale" by the time they
> are used due to the user logging in or out (or similar state changes), in
> response to developer feedback. Workarounds are possible but somewhat
> awkward.
> > >
> > > Fundamentally it seems like something less strict than "Vary: Cookie"
> is called for, which would let the client know which cookie values, if
> changed, invalidate the cached resource. The semantics of this seem
> potentially useful for other kinds of cache (e.g., some caching proxies can
> be configured to work this way), so HTTP WG seems like potentially the
> right venue to discuss this.
> > >
> > > Mark Nottingham's Cookie-Indices proposal (part of HTTP Availability
> Hints) seems likely to address the problem and ought to be implementable
> (I'm prototyping it in Chromium's prefetch cache, at least), so that's what
> I'm looking at right now, but at this moment we're not yet committed to a
> particular solution.
> > >
> > > What do you all think?
> >
> > --
> > Mark Nottingham   https://www.mnot.net/
> >
> >
> >
> >
> > --
> > Marx Robin
> > +32 (0)497 72 86 94
>
> --
> Mark Nottingham   https://www.mnot.net/
>
>