Re: Stream State and PRIORITY Frames

Scott Mitchell <scott.k.mitch1@gmail.com> Tue, 17 January 2017 18:38 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 E10D31294E5 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 17 Jan 2017 10:38:58 -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 2zI0K92CpWuU for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 17 Jan 2017 10:38:57 -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 08F9D1294FF for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 17 Jan 2017 10:38:56 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1cTYcI-000498-FU for ietf-http-wg-dist@listhub.w3.org; Tue, 17 Jan 2017 18:36:22 +0000
Resent-Date: Tue, 17 Jan 2017 18:36:22 +0000
Resent-Message-Id: <E1cTYcI-000498-FU@frink.w3.org>
Received: from titan.w3.org ([128.30.52.76]) 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 1cTYcD-00047o-Pu for ietf-http-wg@listhub.w3.org; Tue, 17 Jan 2017 18:36:17 +0000
Received: from mail-lf0-f45.google.com ([209.85.215.45]) by titan.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 1cTYc5-0007FV-T3 for ietf-http-wg@w3.org; Tue, 17 Jan 2017 18:36:12 +0000
Received: by mail-lf0-f45.google.com with SMTP id k86so115320861lfi.0 for <ietf-http-wg@w3.org>; Tue, 17 Jan 2017 10:35:49 -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=ENwKQv/OEkOggiVHJo4znqVx0q4+VdthPXi8wCW6VG0=; b=EL/ZAmMj8Ac1f4ImfeIkAbqtXFJFM1nLD1jKH/KLFoeDrS9IqBA9vgl10THvtVa5dw 5BYHyP/6c6CKO+k08N9Xbnaq2WYYkq9GIDAhnET+PPGNbLKGSF/emz4f1nC6Mk366qXg kMekr4vCeU+1ybvtnOc1TzTfwBzDq6AI0xxE6nCzIwu4BD/8ht66bVvfgFaNakVTuc3B X5iynrHkuCwlznT/xXBapmsXnFVOGRwNAmtfWO3PAdxC9XRFkhsLLbcu0Y6asXrlfKBn YZ26F2OdB+n1ltrJedYgfzkqTuKmizmxost3mDesrtP5KLCLxsuqq4/gC0g24Gz/3aY1 ZkJQ==
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=ENwKQv/OEkOggiVHJo4znqVx0q4+VdthPXi8wCW6VG0=; b=lwQRj9NPXa9/iZk9VAETtoahlwJ/nz6+ETx1bBgVkF8Oj4NEHGGILYr654UpziXpxt nWo6CigeBl9wJ4BTfDmg9K4Er7ErR7+jVMLt3lBga7wtogTlXVPe3NseOM5ityRWk1Bj MfMua+zgBHz0wZTplUUtKyif8tMF3OKqu2pSeV+iLL/aGEsJ0ghRUnByl3wsRS/AUf3j SqpK/bVq39gnWVJzKnXLbcz6uV2fn8hOjrkyb9J7otXylX51483+9vVpbd7fChs7A1BN rTeiRND9SxF0tEjrFY1NoeGf50U7mNCJFDq1oK40m3ZsJPdlkknBLibF790EquScJ9WR CiVQ==
X-Gm-Message-State: AIkVDXL2WPx/gNYmozD8JZAjlzFncgktIzutb54i/kTMjZqjHa/7LnNiZMNFhmTu3LUDapJcUy8hahqQFgYR+Q==
X-Received: by 10.25.202.83 with SMTP id h19mr14637536lfj.33.1484678143184; Tue, 17 Jan 2017 10:35:43 -0800 (PST)
MIME-Version: 1.0
Received: by 10.25.18.200 with HTTP; Tue, 17 Jan 2017 10:35:42 -0800 (PST)
In-Reply-To: <08A9D76A-CD55-4390-8DED-61210D1A67DB@lukasa.co.uk>
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>
From: Scott Mitchell <scott.k.mitch1@gmail.com>
Date: Tue, 17 Jan 2017 10:35:42 -0800
Message-ID: <CAFn2buD8GORgdpACbuc60RmkeL+yBcb-RZSwwGjTKugWeeNUSQ@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="f403045e9f5054926405464e9128"
Received-SPF: pass client-ip=209.85.215.45; envelope-from=scott.k.mitch1@gmail.com; helo=mail-lf0-f45.google.com
X-W3C-Hub-Spam-Status: No, score=-3.6
X-W3C-Hub-Spam-Report: AWL=-0.326, 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: titan.w3.org 1cTYc5-0007FV-T3 499518c1b5c51172b7ac02e96999ba81
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Stream State and PRIORITY Frames
Archived-At: <http://www.w3.org/mid/CAFn2buD8GORgdpACbuc60RmkeL+yBcb-RZSwwGjTKugWeeNUSQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/33307
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: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.

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
>
>