HTTP/2 States and Frame Types <draft-ietf-httpbis-http2-17>

Bob Briscoe <bob.briscoe@bt.com> Fri, 06 March 2015 19:09 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.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 (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A88AF1A1A45 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 6 Mar 2015 11:09:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.911
X-Spam-Level:
X-Spam-Status: No, score=-6.911 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 dvCEAluTvg_D for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 6 Mar 2015 11:09:25 -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 2DE2B1A1BE4 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 6 Mar 2015 11:09:16 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1YTxZR-0004Dx-SK for ietf-http-wg-dist@listhub.w3.org; Fri, 06 Mar 2015 19:06:01 +0000
Resent-Date: Fri, 06 Mar 2015 19:06:01 +0000
Resent-Message-Id: <E1YTxZR-0004Dx-SK@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.80) (envelope-from <bob.briscoe@bt.com>) id 1YTxZK-0004DB-Vr for ietf-http-wg@listhub.w3.org; Fri, 06 Mar 2015 19:05:55 +0000
Received: from hubrelay-rd.bt.com ([62.239.224.99]) by lisa.w3.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from <bob.briscoe@bt.com>) id 1YTxZJ-0006px-4k for ietf-http-wg@w3.org; Fri, 06 Mar 2015 19:05:54 +0000
Received: from EVMHR72-UKRD.domain1.systemhost.net (10.36.3.110) by EVMHR67-UKRD.bt.com (10.187.101.22) with Microsoft SMTP Server (TLS) id 8.3.348.2; Fri, 6 Mar 2015 19:05:25 +0000
Received: from EPHR01-UKIP.domain1.systemhost.net (147.149.196.177) by EVMHR72-UKRD.domain1.systemhost.net (10.36.3.110) with Microsoft SMTP Server (TLS) id 8.3.348.2; Fri, 6 Mar 2015 19:05:22 +0000
Received: from bagheera.jungle.bt.co.uk (132.146.168.158) by EPHR01-UKIP.domain1.systemhost.net (147.149.196.177) with Microsoft SMTP Server id 14.3.181.6; Fri, 6 Mar 2015 19:05:21 +0000
Received: from BTP075694.jungle.bt.co.uk ([10.111.19.140]) by bagheera.jungle.bt.co.uk (8.13.5/8.12.8) with ESMTP id t26J5JmY015035; Fri, 6 Mar 2015 19:05:19 GMT
Message-ID: <201503061905.t26J5JmY015035@bagheera.jungle.bt.co.uk>
X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9
Date: Fri, 6 Mar 2015 19:05:18 +0000
To: <mbelshe@chromium.org>, <fenix@google.com>, <martin.thomson@gmail.com>
From: Bob Briscoe <bob.briscoe@bt.com>
CC: <ietf-http-wg@w3.org>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="=====================_726724230==.ALT"
X-Scanned-By: MIMEDefang 2.56 on 132.146.168.158
Received-SPF: pass client-ip=62.239.224.99; envelope-from=bob.briscoe@bt.com; helo=hubrelay-rd.bt.com
X-W3C-Hub-Spam-Status: No, score=-1.1
X-W3C-Hub-Spam-Report: AWL=-0.346, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001
X-W3C-Scan-Sig: lisa.w3.org 1YTxZJ-0006px-4k c05e86adb5046a4e4c8feabc0fe434b8
X-Original-To: ietf-http-wg@w3.org
Subject: HTTP/2 States and Frame Types <draft-ietf-httpbis-http2-17>
Archived-At: <http://www.w3.org/mid/201503061905.t26J5JmY015035@bagheera.jungle.bt.co.uk>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/28903
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>

Co-authors & editors,

This is the last of my review postings.

We're working on a generic framing protocol within the TCP Data. The 
main reason I was reading HTTP/2 was to understand it as a set of 
requirements for what we're doing. I don't expect many (any?) of the 
comments below to change the protocol spec, but if someone could 
spare the time to answer my questions, it will help us understand 
what you were trying to do with HTTP/2, so we can better meet its 
needs in future.

I found it very hard to understand the HTTP/2 spec, because it was 
largely a stream of assertions, with hardly any rationale. I read a 
book on SPDY to try to understand some of the rationale, but I got a 
similar barrage of assertions.

All that said, you might want to try to improve the spec with some of 
these answers, because poor comprehensibility leads to bugs, 
particularly bearing in mind non-English implementers need to 
understand the spec too.

Apologies if these questions have been raised before. I tried to 
check with a quick search of the archives and I read the IESG 
reviews, but I may have missed stuff.

<https://tools.ietf.org/html/draft-ietf-httpbis-http2-17#section-2.1>2.1. 
Document Organization
"...this specification does not define a completely generic framing layer..."

Given the prevalence of HTTP, was the design of HTTP/2 framing 
designed for hardware (or software) offload (i.e. required to be 
possible to implement separately from the contents of the frames)? 
Was this a requirement? It's not mentioned. I'm sure it will be done 
now that HTTP/2 is specified.

A great shame it won't be generic, but that's water under the bridge now.

<https://tools.ietf.org/html/draft-ietf-httpbis-http2-17#section-5.1.2>5.1.2. 
Stream Concurrency
"   Streams in either of the "reserved" states do not count toward the
    stream limit."
Why? Once reserved, they require stream state.
In fact, it would be useful to enumerate the amount of state needed 
for each stream.

<https://tools.ietf.org/html/draft-ietf-httpbis-http2-17#section-6>6. 
Frame Definitions
Why the particular set of frame types, and not more or less?

This raises the question of why the frame types have all been defined 
as completely independent. A multi-part frame structure could have 
been used that constrains the order of frames to that required (I've 
done a back of envelope design for this). Without structural ordering 
constraints, it will be necessary to define a very large number of 
ordering errors (many more than the draft currently states).

<https://tools.ietf.org/html/draft-ietf-httpbis-http2-17#section-6.1>6.1. DATA
Why does padding have to be filled with zeros? There are good 
cryptographic reasons for not requiring this. And random padding 
could help ensure that retransmissions are significantly different 
from the original transmission.

Why is the pad length and padding field included in flow control? An 
http receiver (client or intermediate) can discard padding without 
consuming buffer memory, and an intermediate node can then 
reconstruct (a potentially different amount of) padding.

<https://tools.ietf.org/html/draft-ietf-httpbis-http2-17#section-6.2>6.2. 
HEADERS
Why is the END_HEADERS flag needed? Given HEADERS frames MUST be 
contiguous, why can't the Length field of the HEADERS frame specify 
the length of one frame for all http headers, without all the 
complexity of CONTINUATION frames and an END_HEADERS flag?

<https://tools.ietf.org/html/draft-ietf-httpbis-http2-17#section-5.3.5>5.3.5. 
Default Priorities
Why is the default stream weight 16?

<https://tools.ietf.org/html/draft-ietf-httpbis-http2-17#section-6.3>6.3. 
PRIORITY
"The PRIORITY frame can be sent on a stream in any state, though it
    cannot be sent between consecutive frames that comprise a single
    header block"
Why?

<https://tools.ietf.org/html/draft-ietf-httpbis-http2-16#section-6.5>6.5. 
SETTINGS
"     ACK (0x1):  [...] When this
       bit is set, the payload of the SETTINGS frame MUST be empty.
       Receipt of a SETTINGS frame with the ACK flag set and a length
       field value other than 0 MUST be treated as a connection error
"
Why? It would be more efficient, and surely cause no harm, to ack on 
the same frame as sending a setting in the other direction.

<https://tools.ietf.org/html/draft-ietf-httpbis-http2-17#section-6.6>6.6. 
PUSH_PROMISE
Why is the whole PUSH_PROMISES approach needed? Given a request 
doesn't have to use the same stream ID as a response.

<https://tools.ietf.org/html/draft-ietf-httpbis-http2-17#section-6.7>6.7. PING

I don't see the point of the two apparently arbitrary restrictions below.

"  PING frames are not associated with any individual stream.
"
Why prevent an implementer from monitoring the round trip of a specific stream?

"  PING responses SHOULD be given higher priority than any
    other frame.
"
This prevents an implementation from using PING to measure the buffer 
that all other frames have to endure.





Bob



________________________________________________________________
Bob Briscoe,                                                  BT