Re: Alt-Svc alternative cache invalidation (ext#16)

Erik Nygren <erik@nygren.org> Fri, 22 August 2014 21:57 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 (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B4F071A6F6D for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 22 Aug 2014 14:57:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.947
X-Spam-Level:
X-Spam-Status: No, score=-6.947 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.668, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DYDCXbOC1oD0 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 22 Aug 2014 14:57:39 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 202481A0AF0 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 22 Aug 2014 14:57:38 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1XKwn4-0002yI-4G for ietf-http-wg-dist@listhub.w3.org; Fri, 22 Aug 2014 21:54:34 +0000
Resent-Date: Fri, 22 Aug 2014 21:54:34 +0000
Resent-Message-Id: <E1XKwn4-0002yI-4G@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <nygren@gmail.com>) id 1XKwmi-0002uL-Ch for ietf-http-wg@listhub.w3.org; Fri, 22 Aug 2014 21:54:12 +0000
Received: from mail-vc0-f178.google.com ([209.85.220.178]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <nygren@gmail.com>) id 1XKwmh-0003oo-Ha for ietf-http-wg@w3.org; Fri, 22 Aug 2014 21:54:12 +0000
Received: by mail-vc0-f178.google.com with SMTP id la4so13210912vcb.9 for <ietf-http-wg@w3.org>; Fri, 22 Aug 2014 14:53:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=q3RtjExR6CN5s+l1hnpv43lqN7EhZot8xbfbAs035X0=; b=PLUauiwQmiOm1tRPdj+Qn6n3tz2MUkoxCw5FjEpTpAE5AG8TPPFjEOrVvaCMiFzmv9 +RxpuD0Z4xR8gIy7V5dxHtGQ1120LMIfIq4xpRWtSkLQ9TmxZFHhT4Cl5SsNfG3T/BLY 3jBaXXIFDmw7czuNh1oZwzFZ45MDEQYT/7vFbGrVWnm/jObO3/Gk2ULwFO2h7VPx4Q4K oYTDF3v6GDSFZnL2AVdB7/7A+p92guY73su1LHgL2CtHoXm591tA2eUg7JumOlC6PbFt /lD6hf3Aw9vI8yuSCXTSAJQ31va2p08nPLTr6RJC2NovSHo4Jevn8P960EgBH9nyC2oi EQ8A==
MIME-Version: 1.0
X-Received: by 10.220.44.80 with SMTP id z16mr5576772vce.7.1408744425409; Fri, 22 Aug 2014 14:53:45 -0700 (PDT)
Sender: nygren@gmail.com
Received: by 10.221.11.16 with HTTP; Fri, 22 Aug 2014 14:53:45 -0700 (PDT)
In-Reply-To: <CABkgnnW+QM8brr2FkBnOHAhFi9kjdrVoZ+yThckbURq9V5jmnQ@mail.gmail.com>
References: <CABkgnnUDKqPttrp0T-fyrenkgEm=YzwbdmoaJ=Jti3ER1SEAMw@mail.gmail.com> <CAKC-DJgBKoq_M3xMu5115j+OTudSNMNGwOakXjKRP=odVMPn_A@mail.gmail.com> <CABkgnnXRw7Rc7MJddW4UqSo2=hQ2E2EysLyzcaVM6_xf7h0R9g@mail.gmail.com> <CAKC-DJiG+pNAitg6z0wuL16NDnBp0tNwQhpvEWXs77x_c3f=2Q@mail.gmail.com> <53F34F02.2090807@gmx.de> <CABkgnnVQqYhDyLBvfaqD7oWGjY7WuvuSqWERwjoH=bQeh8k79g@mail.gmail.com> <CAKC-DJiD6_3SZd-k7FXCcwuA4AK7kXVupqXuy2+XuQKWtqP2xA@mail.gmail.com> <CABkgnnW+QM8brr2FkBnOHAhFi9kjdrVoZ+yThckbURq9V5jmnQ@mail.gmail.com>
Date: Fri, 22 Aug 2014 17:53:45 -0400
X-Google-Sender-Auth: ERIEzSl2IvdOjMFOocWId7WH8TM
Message-ID: <CAKC-DJhHz1mk0vdVtwmwyccv=LqUb+GrYVukkUYJY4mWdHE-mg@mail.gmail.com>
From: Erik Nygren <erik@nygren.org>
To: Martin Thomson <martin.thomson@gmail.com>
Cc: Julian Reschke <julian.reschke@gmx.de>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="047d7b34313c0e541305013edf17"
Received-SPF: pass client-ip=209.85.220.178; envelope-from=nygren@gmail.com; helo=mail-vc0-f178.google.com
X-W3C-Hub-Spam-Status: No, score=-3.5
X-W3C-Hub-Spam-Report: AWL=-2.764, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1XKwmh-0003oo-Ha c1460ad1d846a46a6c7b50cc009fe1ea
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Alt-Svc alternative cache invalidation (ext#16)
Archived-At: <http://www.w3.org/mid/CAKC-DJhHz1mk0vdVtwmwyccv=LqUb+GrYVukkUYJY4mWdHE-mg@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/26712
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>

Taking a careful read-through again, I think the cleanest thing to do is to
change the ALTSVC frame structure to allow multiple alternatives.  Note
that the current text reads for the header:

   When an Alt-Svc response header field is received from an origin, its
value
   invalidates and replaces all cached alternative services for that origin.

but does not define anything similar for the ALTSVC frame.  Aligning the
frame and the
header would allow this to apply to both.

If we're changing the frame structure, I think it would be better to fold
the port and host into a single field.  Different non-TCP protocols may
have different ways of defining ports that may not necessarily be 16 bits.
To align them well, it also seems like it would make sense to have
Ext-Param in the frame as well
(which can be some to-be-defined-in-the-future string with the same format
as ext-param in Alt-Svc header)

For example:

  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                          Max-Age (32)                         |
 +---------------+---------------+-------------------------------+
 | Num-AltAuth(8)|
 +---------------+---------------+-------------------------------+
 | Proto-Len(8)  |        Protocol-ID (*)                        |
 +---------------+-----------------------------------------------+
 | AltAuth-Len(8)|        Alt-Auth (*)                         ...
 +---------------+-----------------------------------------------+
 | Origin-Len (8)|          Origin? (*)                        ...
 +---------------------------------------------------------------+
 |                        Ext-Param? (*)                       ...
 +---------------------------------------------------------------+

This would allow the same things to be expressed in the header and the
frame.

      Erik






On Tue, Aug 19, 2014 at 7:09 PM, Martin Thomson <martin.thomson@gmail.com>
wrote:

> On 19 August 2014 15:09, Erik Nygren <erik@nygren.org> wrote:
> > With a set of options
> > it becomes much more clear when the client can start taking action
> > without needing to worry about thrashing.
>
> I think that I can concede that point.  It will make the ALTSVC frame
> uglier, but that's fine.
>
> > Additionally, how does a server remove/replace an ALTSVC record it set
> > previously without waiting for a TTL expiration?
>
> That's only a problem if you forget about one.
>