Re: Stream State and PRIORITY Frames

Scott Mitchell <scott.k.mitch1@gmail.com> Thu, 19 January 2017 23:01 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 B640E129462 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 19 Jan 2017 15:01: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 8Mwgac83a6Y6 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 19 Jan 2017 15:01:56 -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 D9AEB128E19 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 19 Jan 2017 15:01: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 1cULg4-0003Rm-PL for ietf-http-wg-dist@listhub.w3.org; Thu, 19 Jan 2017 22:59:32 +0000
Resent-Date: Thu, 19 Jan 2017 22:59:32 +0000
Resent-Message-Id: <E1cULg4-0003Rm-PL@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 1cULg0-0003QB-2a for ietf-http-wg@listhub.w3.org; Thu, 19 Jan 2017 22:59:28 +0000
Received: from mail-lf0-f43.google.com ([209.85.215.43]) 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 1cULft-00074Y-OK for ietf-http-wg@w3.org; Thu, 19 Jan 2017 22:59:22 +0000
Received: by mail-lf0-f43.google.com with SMTP id k86so46688437lfi.0 for <ietf-http-wg@w3.org>; Thu, 19 Jan 2017 14:59:01 -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=EjWCt1Y/CesA8X3hIM7BlF1uCR3hbfd9RAqgyOu9nsI=; b=fSN+twuRNX7qT9b85iYwL3th9iKSE0BTrlYee9KeYThMpi8OC/nUJ+PK4uVr59Adjl rhohz3QfPoVgxeApJcjzHGniDLIzMjB6fLXu7z59dMzvZ4WvmRZ7dIBYpR3DIurEzakG lmKoF7qzWPcBl6fUjODoe+85rnlxZdcGb8fW1Uwg1Rr58pvVBzhhf418nEqG0PsLRRjh CIB6FuM+OhOshRHyYHkBi0cnrujFPTAUvqn7JPMzjKf6SzEwhWwru8bOShJqHh3DbOql Gp3YWOL0etd3yl+UyO1lBxvwpdX/vbFrJK2nhQKDwDwYCjZYNuVdZcz/9MEsFQ7F6hFQ Ey1Q==
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=EjWCt1Y/CesA8X3hIM7BlF1uCR3hbfd9RAqgyOu9nsI=; b=raRdp1ZrQUJJN3ItBYWB2L2bUnDf6YX8Mm3lqIrYEoVvITmU5KX+wJKzj1KmybocuH 1hK/wtpEsa5v9QMxnxSExGuZdyJQuya95YUdyxdhvG3QQW8LG5lPJLgqDMGENxERem3i o/HAW0sz92vISLYV0HAtj/XusbwIHX1gHU+L1jR5XSivFyp5k4rl+JhuTheQfKpHaRJ1 xFSFZOTX+1u+HE4ZvLR4XoOJnn/JlyViPx8/DksD5u6Rik1+ItlCrdACSK18US0zGmwl xcHaMjeH41hECR8QozW1UzWNh25OwUQ1Yeb6AfGsdUORKQc1Koh9cOWW3K82/IES8bnc VbdQ==
X-Gm-Message-State: AIkVDXK00/YR4bVJswIRr3hTolwsCnmk02ulWmGi6mGTuxjJJRd6ZEFWuUS2C7sGANW8iqZHYYTKhD/yKObxfg==
X-Received: by 10.46.6.1 with SMTP id 1mr5479628ljg.34.1484866734582; Thu, 19 Jan 2017 14:58:54 -0800 (PST)
MIME-Version: 1.0
Received: by 10.25.18.200 with HTTP; Thu, 19 Jan 2017 14:58:53 -0800 (PST)
In-Reply-To: <CAOdDvNo1mvmvXjeYtUiNahzYJa1gr3N88BGJpyduYGwUB7oP-A@mail.gmail.com>
References: <CAFn2buAYWHQSWhhoKZ2GKbqXR1A+tScjkAwZmOuQ9gV9jMp2bA@mail.gmail.com> <CAGZNdJWe0Y=M_SWmgYabKbWZwPEuJdw67Km8+UtR4oUtZuXA5A@mail.gmail.com> <2BC01E49-91A1-43A7-AFD0-5A34F2689428@lukasa.co.uk> <CAFn2buDCMwMp=rR0C_yt4-gUwyFhY6ruonz9wT-jVMu+Kir=nA@mail.gmail.com> <C51C3F51-37BE-489F-BA1D-76B101517307@lukasa.co.uk> <CAFn2buAE-EdTEG9x-wLQSy5Osmcq1Hdps9YLW_7j9CTV4_Fuyw@mail.gmail.com> <CAOdDvNo1mvmvXjeYtUiNahzYJa1gr3N88BGJpyduYGwUB7oP-A@mail.gmail.com>
From: Scott Mitchell <scott.k.mitch1@gmail.com>
Date: Thu, 19 Jan 2017 14:58:53 -0800
Message-ID: <CAFn2buAAd5pN4A3_zkNMC6y=i1rkQut6=p1RnJYfT9inhpFG4Q@mail.gmail.com>
To: Patrick McManus <mcmanus@ducksong.com>
Cc: Cory Benfield <cory@lukasa.co.uk>, Benedikt Christoph Wolters <benedikt.wolters@rwth-aachen.de>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="f403045f9f8440f15d05467a7a21"
Received-SPF: pass client-ip=209.85.215.43; envelope-from=scott.k.mitch1@gmail.com; helo=mail-lf0-f43.google.com
X-W3C-Hub-Spam-Status: No, score=-2.5
X-W3C-Hub-Spam-Report: AWL=0.732, 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 1cULft-00074Y-OK 1d2d31e3f0ce0cc93c92123aea3ce072
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Stream State and PRIORITY Frames
Archived-At: <http://www.w3.org/mid/CAFn2buAAd5pN4A3_zkNMC6y=i1rkQut6=p1RnJYfT9inhpFG4Q@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/33334
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 Thu, Jan 19, 2017 at 7:55 AM, Patrick McManus <mcmanus@ducksong.com>
wrote:

>
>
> On Wed, Jan 18, 2017 at 7:53 PM, Scott Mitchell <scott.k.mitch1@gmail.com>
> wrote:
>
>>
>>
>> Based on the RFC it seems like stream ids {3, 5, 7, 11} should be closed
>> at step (6). Note that FF is not doing anything wrong here. It shouldn't
>> have to care that the streams are CLOSED in this scenario (assuming these
>> streams only ever have PRIORITY frames exchanged). It would be interesting
>> to get a FF dev to comment on the expected stream state here just to be
>> sure these streams will only be used for PRIORITY.
>>
>
> Yes, they are grouping nodes and serve no other purpose. I personally
> believe they are in the idle state, but I know some people believe they are
> closed with a priority attached. That doesn't seem to matter in practice.
>
>


The state transition I mentioned above is triggered by a HEADERS frame. So
far I have not heard any dispute over this. It seem to be clearly defined
in section 5.1.1 (see below). Do you have a different interpretation of
this section?

https://tools.ietf.org/html/rfc7540#section-5.1.1

The first use of a new stream identifier implicitly closes all streams
in the "idle" state that might have been initiated by that peer with a
lower-valued stream identifier.  For example, if a client sends a
HEADERS frame on stream 7 without ever sending a frame on stream 5,
then stream 5 transitions to the "closed" state when the first frame
for stream 7 is sent or received.



Either way maintaining/interpreting the priority is at the discretion of
>> the server and these streams being closed does not impact the server's
>> ability to do this (as discussed previously the RFC suggests retaining
>> priority for closed streams).
>>
>>
>
> So yes, and no. Certainly the server is in compliance in just ignoring
> everything it knows about priority indications from the client. OTOH,
> things can get very very screwed performance wise if dependencies are
> disregarded and the state of priority is just determined by the local
> weights on each stream. I've seen servers do this and create terrible
> results.
>
>

I'm not suggesting that servers should ignore priority, and I agree this
can be detrimental to page load times and general performance. My point was
meant to clarify the actual behavior of FF since it was used as an example
of "transitioning the stream state would be unexpected". The way FF
currently behaves these streams should be closed because a HEADERS frame is
used anyways.