Re: Submitted new I-D: Cache Digests for HTTP/2

Stefan Eissing <stefan.eissing@greenbytes.de> Tue, 12 January 2016 09:50 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@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 E6C3B1A6FBF for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 12 Jan 2016 01:50:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.003
X-Spam-Level:
X-Spam-Status: No, score=-7.003 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.001, 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 plwpELdElQ0Y for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 12 Jan 2016 01:50:21 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 52DF01A6FBC for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 12 Jan 2016 01:50:21 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1aIvXN-0001lN-B5 for ietf-http-wg-dist@listhub.w3.org; Tue, 12 Jan 2016 09:46:49 +0000
Resent-Date: Tue, 12 Jan 2016 09:46:49 +0000
Resent-Message-Id: <E1aIvXN-0001lN-B5@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <stefan.eissing@greenbytes.de>) id 1aIvXL-0001kj-IW for ietf-http-wg@listhub.w3.org; Tue, 12 Jan 2016 09:46:47 +0000
Received: from mail.greenbytes.de ([217.91.35.233]) by maggie.w3.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from <stefan.eissing@greenbytes.de>) id 1aIvXJ-00058w-7R for ietf-http-wg@w3.org; Tue, 12 Jan 2016 09:46:46 +0000
Received: by mail.greenbytes.de (Postfix, from userid 117) id C8D5815A0643; Tue, 12 Jan 2016 10:46:21 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=greenbytes.de; s=mail; t=1452591981; bh=0ap0jK/QiD9VpCIysqzZ1pNa6xEaaZ5gil7BVAuPscI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=im2Ej7Rz3tSlnLu82QOO24LLLPRyh0+f8CoisKqEaAYIL6VZ+j4HH7eHtZxkQMN+h ZqDjHvX8MdOOlWJQ0lQOmcheUXwP9cwLHD5XAGGHIF1t3+3M52mS5eb8a4VkrYfpZm sP+BoD8DlVE24uXOkZBMkaqP4f7NWXsEXcouoe7I=
Received: from [192.168.1.42] (unknown [217.91.35.233]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.greenbytes.de (Postfix) with ESMTPSA id 92CCC15A0361; Tue, 12 Jan 2016 10:46:21 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=greenbytes.de; s=mail; t=1452591981; bh=0ap0jK/QiD9VpCIysqzZ1pNa6xEaaZ5gil7BVAuPscI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=im2Ej7Rz3tSlnLu82QOO24LLLPRyh0+f8CoisKqEaAYIL6VZ+j4HH7eHtZxkQMN+h ZqDjHvX8MdOOlWJQ0lQOmcheUXwP9cwLHD5XAGGHIF1t3+3M52mS5eb8a4VkrYfpZm sP+BoD8DlVE24uXOkZBMkaqP4f7NWXsEXcouoe7I=
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\))
From: Stefan Eissing <stefan.eissing@greenbytes.de>
In-Reply-To: <CANatvzxcKS46iAqAdfBHuWPt5k3XkR79NDMPPtDakOb2jPAywA@mail.gmail.com>
Date: Tue, 12 Jan 2016 10:46:23 +0100
Cc: HTTP Working Group <ietf-http-wg@w3.org>
Content-Transfer-Encoding: 7bit
Message-Id: <BF19D095-8A69-47D0-8B9A-CEEFA8E80627@greenbytes.de>
References: <CAAMqGzYUoCMxBxUEY9wfLOHZp7nrO4d1q5JZo=96pfEbVS1-ew@mail.gmail.com> <CANatvzxcKS46iAqAdfBHuWPt5k3XkR79NDMPPtDakOb2jPAywA@mail.gmail.com>
To: Kazuho Oku <kazuhooku@gmail.com>
X-Mailer: Apple Mail (2.3112)
Received-SPF: pass client-ip=217.91.35.233; envelope-from=stefan.eissing@greenbytes.de; helo=mail.greenbytes.de
X-W3C-Hub-Spam-Status: No, score=-5.1
X-W3C-Hub-Spam-Report: AWL=-1.117, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: maggie.w3.org 1aIvXJ-00058w-7R 190a095f17839fb4b1434754daff1deb
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Submitted new I-D: Cache Digests for HTTP/2
Archived-At: <http://www.w3.org/mid/BF19D095-8A69-47D0-8B9A-CEEFA8E80627@greenbytes.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/30899
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>

Kazuho,

thanks for the draft and your work in this. I am currently implementing
a "push diary" for connections in mod_http2. This updates itself while
handling the connection, but ideally is initialized by a CACHE_DIGEST
frame.

> Am 12.01.2016 um 02:04 schrieb Kazuho Oku <kazuhooku@gmail.com>:
> [...]
> There are three options here (the draft adopts option C):
> 
> a) send CACHE_DIGEST frame right before HEADERS
> b) send CACHE_DIGEST frame at stream_id=zero, with the value of the
> authority that should be associated to the digest included within the
> frame
> c) send CACHE_DIGEST frame right after HEADERS
> 
> B is clearly the easiest but would have a small impact on the consumed
> bandwidth, since the authority needs to be sent separately.
> 
> In A, the server does not need to delay the processing of the request,
> but needs to cache the value of the digest.
> 
> It would be great to discuss which of the three approach will be the
> best solution in general (or if there could be other approaches).

There seems to be an underlying assumption here that CACHE_DIGEST is 
connected to a specific authority which was not immediately obvious 
to me when reading the draft.

With that in mind, I would prefer the CACHE_DIGEST frame to
carry the authority scope. That makes it self descriptive and
it can be sent on stream 0, which solves the before/after problem.

Also, I think the authority in that frame should be allowed to carry
the value '*' to allow endpoint implementations that keep one set
for all authorities on a connection.

Additionally:

1. Just for clarification: the digest values are calculated on 
the absolute URL, :scheme+'://'+:authority+:path? Because h2o
currently uses only :path, if I read it right.

2. Would it make sense to limit N and P, so that (N*P) which is
used for modulo calculation stays in unsigned 32 bit? Even with
N==P it would work up to 65K, if I am not mistaken...

-Stefan

> -- 
> Kazuho Oku