Re: Stream State and PRIORITY Frames

Scott Mitchell <scott.k.mitch1@gmail.com> Tue, 17 January 2017 20:16 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 (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id ED55612945F for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 17 Jan 2017 12:16:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.719
X-Spam-Level:
X-Spam-Status: No, score=-9.719 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, RP_MATCHES_RCVD=-3.199, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 Pb2qkAZzG8O5 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 17 Jan 2017 12:16:15 -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 C925C127A91 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 17 Jan 2017 12:16:15 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1cTa8V-0001gP-9m for ietf-http-wg-dist@listhub.w3.org; Tue, 17 Jan 2017 20:13:43 +0000
Resent-Date: Tue, 17 Jan 2017 20:13:43 +0000
Resent-Message-Id: <E1cTa8V-0001gP-9m@frink.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by frink.w3.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <scott.k.mitch1@gmail.com>) id 1cTa8Q-0001fc-U1 for ietf-http-wg@listhub.w3.org; Tue, 17 Jan 2017 20:13:38 +0000
Received: from mail-lf0-f47.google.com ([209.85.215.47]) by mimas.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <scott.k.mitch1@gmail.com>) id 1cTa8J-0008Tr-CJ for ietf-http-wg@w3.org; Tue, 17 Jan 2017 20:13:33 +0000
Received: by mail-lf0-f47.google.com with SMTP id z134so114018446lff.3 for <ietf-http-wg@w3.org>; Tue, 17 Jan 2017 12:13:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=qyLBdsJ4tn7gcS8DiV+D8FRFxPWgsjyITHhFR+D4GeU=; b=AjU8wbiEYHBG0CQslAchehk6fdQ7URvCcL5HYQiTIC/f6bwCRtGktY9pPYuEogVenF Q0PbP1hef90CLoo3GkEXWVJrK8PGoadb53TKHZMFr6CP+903ftbVb+CwV4GotSyqDLTX v9bKyy55KDYodpwf2Ox/bpDYCACQ6uxHlGJwN0oad1D1yc51dla4k+vTgbKpRWPQf9hf TF7WBX83ox8OIjqtl4Jak3AuGdgTKlLWfuvtacc/Tf9p6ncSU2NBY3ansRLEz0fXknzF PlZoNwzjIdDyW5GiVLtUQepbysG3rrsYhryTrufZhDjrZHG0zMuvl3XKvnASuBRFbCd4 sa6g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=qyLBdsJ4tn7gcS8DiV+D8FRFxPWgsjyITHhFR+D4GeU=; b=lKTyKdhVvTEjQUeBUtzWvFBTnxlUFW655gGHeURUl4WhxlPU26F+31xeBAI1rrTScn 7edudzAPfl6gdcVID1GyEV4guf4DG0isJEsKMK3UlP6fMDcyf0sLMfCHjYilhQYEyR8l CzXrK4dmMUVqukE/xpLagNO5k0joLshvg7V9v1c2RulhpG30LUFkFLtGeb4qPn0lDIwj o2MNBcb4pW2/QapMtfbBljDy2dieS+OPNwJej035+lj2ShfeP/2mkXpO8GaA9wSJcfLO uurHJ/zJFxI/oJINh8HcYFQqI/AY2Tg6Wn32NlSunwl8o2X+DzipiwH48hNzKTRtZEJC 9TTA==
X-Gm-Message-State: AIkVDXLkBCK/ypygwhrDEHA5U2TW20Kkha0tCD2d1NVwWR0LHsyUFLUSFTu8S+qxXG8Zfjk97PljCrlng8jzZw==
X-Received: by 10.46.75.1 with SMTP id y1mr8759464lja.65.1484683984269; Tue, 17 Jan 2017 12:13:04 -0800 (PST)
MIME-Version: 1.0
Received: by 10.25.18.200 with HTTP; Tue, 17 Jan 2017 12:13:03 -0800 (PST)
In-Reply-To: <CAFn2buD8GORgdpACbuc60RmkeL+yBcb-RZSwwGjTKugWeeNUSQ@mail.gmail.com>
References: <CAFn2buAYWHQSWhhoKZ2GKbqXR1A+tScjkAwZmOuQ9gV9jMp2bA@mail.gmail.com> <CAGZNdJWe0Y=M_SWmgYabKbWZwPEuJdw67Km8+UtR4oUtZuXA5A@mail.gmail.com> <2BC01E49-91A1-43A7-AFD0-5A34F2689428@lukasa.co.uk> <CAFn2buC7vM1Ff13A305-2bLBLRzLVaURufGCDrpm_rs82jwkwQ@mail.gmail.com> <08A9D76A-CD55-4390-8DED-61210D1A67DB@lukasa.co.uk> <CAFn2buD8GORgdpACbuc60RmkeL+yBcb-RZSwwGjTKugWeeNUSQ@mail.gmail.com>
From: Scott Mitchell <scott.k.mitch1@gmail.com>
Date: Tue, 17 Jan 2017 12:13:03 -0800
Message-ID: <CAFn2buCx63fxPoM34MxATSSvrAznsob_tuamM1Zv9OJs1-ys1Q@mail.gmail.com>
To: Cory Benfield <cory@lukasa.co.uk>
Cc: Benedikt Christoph Wolters <benedikt.wolters@rwth-aachen.de>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="f403045ea47a7c758705464fedfe"
Received-SPF: pass client-ip=209.85.215.47; envelope-from=scott.k.mitch1@gmail.com; helo=mail-lf0-f47.google.com
X-W3C-Hub-Spam-Status: No, score=-3.4
X-W3C-Hub-Spam-Report: AWL=-0.128, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1cTa8J-0008Tr-CJ 81b7045dd53db56416569705978ec43e
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Stream State and PRIORITY Frames
Archived-At: <http://www.w3.org/mid/CAFn2buCx63fxPoM34MxATSSvrAznsob_tuamM1Zv9OJs1-ys1Q@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/33309
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>

On Tue, Jan 17, 2017 at 10:35 AM, Scott Mitchell <scott.k.mitch1@gmail.com>
wrote:

>
>
> On Tue, Jan 17, 2017 at 10:25 AM, Cory Benfield <cory@lukasa.co.uk> wrote:
>
>>
>> On 17 Jan 2017, at 18:16, Scott Mitchell <scott.k.mitch1@gmail.com>
>> wrote:
>>
>> Thanks for responses everyone. There seems to be recognition that the
>> specification lacks clarity but there also seems to be momentum behind
>> "Option 1".
>>
>> This leads to the practical concern of bounding the amount of memory
>> committed to streams in this state. SETTINGS_MAX_CONCURRENT_STREAMS limits
>> number of streams in "open" or "half-closed", but the specification doesn't
>> (to my knowledge) define a way to limit the number of "reserved" streams or
>> "idle"/"closed" streams which have had only PRIORITY frames exchanged. The
>> specification allows for implementations to discard PRIORITY more or less
>> at their discretion [3], but limiting "reserved" streams is another issue. "
>> SETTINGS_ENABLE_PUSH" is limited to 0 or 1 [4] so there is no way for a
>> client to advertise how many "reserved" streams it is willing to accept.
>> What are the practical approaches folks have taken to address these issues?
>>
>> [3] https://tools.ietf.org/html/rfc7540#section-5.3.4
>> > The retention of priority information for streams that are not counted
>> toward the limit set by SETTINGS_MAX_CONCURRENT_STREAMS could create a
>> large state burden for an endpoint. Therefore, the amount of
>> prioritization state that is retained MAY be limited.
>> [4] https://tools.ietf.org/html/rfc7540#section-6.5.2
>>
>> > The initial value is 1, which indicates that server push is permitted.  Any value other than 0 or 1 MUST be treated as a connection error (Section 5.4.1 <https://tools.ietf.org/html/rfc7540#section-5.4.1>) of type PROTOCOL_ERROR.
>>
>>
>> SETTINGS_MAX_CONCURRENT_STREAMS is used to limit the number of pushed
>> streams.
>>
>> The key thing to understand is that there are *two* values of
>> SETTINGS_MAX_CONCURRENT_STREAMS on each connection: one set by the
>> client and one set by the server. The one set by the server limits the
>> number of client-initiated streams there may be (that is, streams initiated
>> by HEADERS frames). The one set by the client limits the number of
>> server-initiated streams there may be (that is, streams initiated by
>> PUSH_PROMISE frames).
>>
>> This is laid out explicitly in RFC 7540 Section 8.2.2:
>>
>
> Ahh yes I forgot about this. Thanks for reminding me.
>
>
I recall where my confusion stems from. Section 5.1.2 contradicts the
statements in Section 8.2.2 you referenced. Section 5.1.2 explicitly states
that "reserved" streams do not count toward SETTINGS_MAX_CONCURRENT_STREAM
S [5].

[5] https://tools.ietf.org/html/rfc7540#section-5.1.2
> Streams that are in the "open" state or in either of the "half-closed"
states count toward the maximum number of streams that an endpoint is
permitted to open. Streams in any of these three states count toward the
limit advertised in the SETTINGS_MAX_CONCURRENT_STREAMS setting. Streams in
either of the "reserved" states do not count toward the stream limit.



> Any thoughts on limiting the stream priority?
>
>
>>
>> > A client can use the SETTINGS_MAX_CONCURRENT_STREAMS setting to limit
>> > the number of responses that can be concurrently pushed by a server.
>> > Advertising a SETTINGS_MAX_CONCURRENT_STREAMS value of zero disables
>> > server push by preventing the server from creating the necessary
>> > streams.  This does not prohibit a server from sending PUSH_PROMISE
>> > frames; clients need to reset any promised streams that are not
>> > wanted.
>>
>> Cory
>>
>>
>