HTTP 2 Header Tables and Priority

Steve Davis <steven.charles.davis@gmail.com> Sun, 04 August 2013 16:46 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 2560C21F9D21 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 4 Aug 2013 09:46:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.598
X-Spam-Level:
X-Spam-Status: No, score=-10.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id All7XxXZVq86 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 4 Aug 2013 09:46:00 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 812B421F9CA0 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 4 Aug 2013 09:46:00 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1V61Ok-0004UP-0y for ietf-http-wg-dist@listhub.w3.org; Sun, 04 Aug 2013 16:43:14 +0000
Resent-Date: Sun, 04 Aug 2013 16:43:14 +0000
Resent-Message-Id: <E1V61Ok-0004UP-0y@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <steven.charles.davis@gmail.com>) id 1V61OK-0004T7-E3 for ietf-http-wg@listhub.w3.org; Sun, 04 Aug 2013 16:42:48 +0000
Received: from mail-gh0-f178.google.com ([209.85.160.178]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <steven.charles.davis@gmail.com>) id 1V61OJ-0004n8-Qd for ietf-http-wg@w3.org; Sun, 04 Aug 2013 16:42:48 +0000
Received: by mail-gh0-f178.google.com with SMTP id g15so930801ghb.37 for <ietf-http-wg@w3.org>; Sun, 04 Aug 2013 09:42:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:subject:message-id:date:to:mime-version:x-mailer; bh=flY8bAt6kjt40w1kQKlW8glFI4ARpNWNN2R2sDtwYy0=; b=tsZ/NJu9nXlqwg4DU8IRTtsYtzORLmt3d3QF6DzhaOcmzwOnv2IGuSTVO3KiWrh7Uq QA7tugLqZVfZlnwvW6bbSoc0uRJzHNdxrgB1so2N8bTgnEF7HynsmmGu9liSkQMb92Xv v3lI6UDAsXVYDzw3JhEJsQJbndHFEasIxK5B9OOmvfVFa4UsIXWangskinq6uqY1M/qn w6NnJnRDtGtVvS2gkTmMgCspnIgke+uiaZjT2jMNkaxy3P8xdCsyaAcxXgAzSPFVrWLH OGHe6KmchFruSpX/16nPDwrr4zj+eA2XX8lm+9ML3lMgQAf5r3cEE/D3ebJrQMyniFJi xwHA==
X-Received: by 10.236.104.162 with SMTP id i22mr9341039yhg.193.1375634542161; Sun, 04 Aug 2013 09:42:22 -0700 (PDT)
Received: from [10.0.1.15] (71-81-203-43.dhcp.stls.mo.charter.com. [71.81.203.43]) by mx.google.com with ESMTPSA id b50sm26976617yhl.1.2013.08.04.09.42.21 for <ietf-http-wg@w3.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 04 Aug 2013 09:42:21 -0700 (PDT)
From: Steve Davis <steven.charles.davis@gmail.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_D9C9AD72-FC03-4096-A3BC-E2F95CD43361"
Message-Id: <CC208115-2584-4266-A868-3E3E082B308A@gmail.com>
Date: Sun, 04 Aug 2013 11:42:20 -0500
To: ietf-http-wg@w3.org
Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\))
X-Mailer: Apple Mail (2.1508)
Received-SPF: pass client-ip=209.85.160.178; envelope-from=steven.charles.davis@gmail.com; helo=mail-gh0-f178.google.com
X-W3C-Hub-Spam-Status: No, score=-0.8
X-W3C-Hub-Spam-Report: AWL=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-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 1V61OJ-0004n8-Qd 4b161b674240cff5aba2d2e69725d43b
X-Original-To: ietf-http-wg@w3.org
Subject: HTTP 2 Header Tables and Priority
Archived-At: <http://www.w3.org/mid/CC208115-2584-4266-A868-3E3E082B308A@gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/19052
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>

If I understand correctly from reading -http2-04 and -compression-01, then the following is true:

1) There is only one set of request/response header tables per connection that serves all streams.

2) It is essential that the header table indexes and values are agreed by both peers in order to interpret and process future header frames correctly. i.e. The respective tables must be in the same state when interpreting a new header frame as it was on the peer when constructing the header frame.

3) However, streams can be prioritized for processing order according to the implementation.

Given the above, there does not seem to be an ordering of header frame processing that will guarantee that the header tables of the connected peers will remain synchronized. Is this a mis-read, or a genuine issue?

A few smaller observations:

1) regarding -compression-01 is that substitution and increment indices are represented by (index + 1) to avoid collision with the literal prefix. Would it not be simpler, less bug-prone, and generally more consistent to simply define the start of the header index tables at index 1?

2) regarding -http2-04, there's a slightly inconsistent wording wrt the frame flag bits, e.g in section 6.2: 
 END_STREAM (0x1):  Bit 1 being set indicates that this frame is the
      last that the endpoint will send for the identified stream
Since bit numbering in the rest of the document number is decimal starting from 0, "bit 1" suggests 0x40. I am assuming 0x1 is the correct interpretation here which would appear in the decimal ordering as used in the rest of the document as "7"... minor nit-pick, I know.

3) in -compression-01 the whole idea of "integer encoding" seems overly-complex in order to save a few bits. Given the overall saving provided already by indexing, I question whether this additional saving really worth the effort? I guess that's a call between network saving and cpu savings... in this case I'd say simplicity would be more worthwhile than the savings for the network -- but that's just an opinion. 

regs,
/s