Re: http/2 prioritization/fairness bug with proxies

William Chan (陈智昌) <willchan@chromium.org> Sun, 10 February 2013 22:42 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 0CDE621F84C9 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 10 Feb 2013 14:42:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.283
X-Spam-Level:
X-Spam-Status: No, score=-9.283 tagged_above=-999 required=5 tests=[AWL=0.393, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i0ibOwH3sTXk for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 10 Feb 2013 14:42:43 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 937DF21F8473 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 10 Feb 2013 14:42:43 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1U4faE-0001va-Hb for ietf-http-wg-dist@listhub.w3.org; Sun, 10 Feb 2013 22:41:14 +0000
Resent-Date: Sun, 10 Feb 2013 22:41:14 +0000
Resent-Message-Id: <E1U4faE-0001va-Hb@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <willchan@google.com>) id 1U4fa2-0001rv-86 for ietf-http-wg@listhub.w3.org; Sun, 10 Feb 2013 22:41:02 +0000
Received: from mail-qc0-f181.google.com ([209.85.216.181]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <willchan@google.com>) id 1U4fa1-0004aj-0u for ietf-http-wg@w3.org; Sun, 10 Feb 2013 22:41:02 +0000
Received: by mail-qc0-f181.google.com with SMTP id a22so2047929qcs.12 for <ietf-http-wg@w3.org>; Sun, 10 Feb 2013 14:40:33 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=jpSUOD6VVQv8/Vvm5pQr4HlZil+slAyu5wSNa8fohbA=; b=eP5tm6BJNf2QUe/o2lXnGLvGyRKXkLxdVczFog0osqRqwJajEgIyY7FzqhiDtdZyXm bB0G/B7zPL66UdS5Ve/KFdzNe7Bgv2ktzVpxPYlWDLF2AcYBBIN8/MJTSZaC/VvguEbQ wkeOt95SKbahGKXUhu8frz0s8oziVyy5IpRqNAgx3GmkAzW1cXuh40C6QiiOWKo25nXf ObPkwcAUz1NJtNW1O3uNHrKaRYMpRjb7oDPxk1/VT7UulmQCmU8V9pd+xafeavjmUjFV xTFRjMPb4w7uBd8UhUDEKFRq7X2XuHVr1cCt9/CjzqFhtL7B5h/txOFw6gUFhgnVoEG/ Zf/Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=jpSUOD6VVQv8/Vvm5pQr4HlZil+slAyu5wSNa8fohbA=; b=W1yl4gU6+fxwKBxlB85nC6Zyx/iN0RDhDJhTdXmlh3nbSCZbxo/hUCYKQG1qWqJcnE yeb1M4mTb0xMmohFbz6hl5m4rSG7S64lKMTRrFHi2Di0IiUC7S4Dy3zTK4x4SlY1AFcf vJGGFkMURcuxWAgTQhrx1TXQEcN8UJOXP5x4k=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :x-gm-message-state; bh=jpSUOD6VVQv8/Vvm5pQr4HlZil+slAyu5wSNa8fohbA=; b=g2n3NTr6yWLeOoll2IRtqAmfk+sNYoWe5XK5RxYC/LebkSAQ81gOIhTpp/S4jKjy4I 3nJBWJrOuxVRWMFoj9prKzOLWZVGJ+iMisbCXCgikSAoT0Djv+QUSSF4+2NdiT3dEyof SAfAiYQ9Y3BIN9AlmABpJUeHP8s70R+EaQbDLk3ZSZFmxVjCQKG9hbNdGT3KOrjg5gL7 MgyhuHgQhaOVVe/9f0WzMCH9Ulln/OapYItWCUPeaLWRY+Ng5lqIEup2GbVJ/MFC6cup +1jZ+T0Q7SY9DH8PFA2CfiL66He3v6Guuh/UhHllAMMk28ZTtA4bZLihbWC7sUtUYqCB xp7g==
MIME-Version: 1.0
X-Received: by 10.224.180.212 with SMTP id bv20mr4563854qab.6.1360536033655; Sun, 10 Feb 2013 14:40:33 -0800 (PST)
Sender: willchan@google.com
Received: by 10.229.57.163 with HTTP; Sun, 10 Feb 2013 14:40:33 -0800 (PST)
In-Reply-To: <CABaLYCtX04se2BJ0c1yCYkwH2xvkcETdu7Pe+B8fy=DJrouo6Q@mail.gmail.com>
References: <CAA4WUYjiBZpShKKFfHQnixc94aOLrck0oR4ykARB=hF5h8nkfA@mail.gmail.com> <3430.1359961022@critter.freebsd.dk> <510F72CE.8030003@treenet.co.nz> <CAA4WUYiBJrLjM0-vurFOuJfUaabXtK=W8N5z28yshSfrvD9crg@mail.gmail.com> <1516.1360002578@critter.freebsd.dk> <42A54D15-0AA3-4172-94F7-E94C86E84D7F@niven-jenkins.co.uk> <2346.1360010079@critter.freebsd.dk> <CAA4WUYiyu+JvFuKooqa4xVdCJP=Mngu9dgHjhH99_SEac1kCZQ@mail.gmail.com> <CABaLYCtX04se2BJ0c1yCYkwH2xvkcETdu7Pe+B8fy=DJrouo6Q@mail.gmail.com>
Date: Sun, 10 Feb 2013 14:40:33 -0800
X-Google-Sender-Auth: wKqRC_QMoKTXTTpkgdr0JMC6rbE
Message-ID: <CAA4WUYitNR0js+5m5RHfLp-7=k-mfTUKDcayW-uzJwTgOgMyYQ@mail.gmail.com>
From: "William Chan (陈智昌)" <willchan@chromium.org>
To: Mike Belshe <mike@belshe.com>
Cc: Poul-Henning Kamp <phk@phk.freebsd.dk>, Ben Niven-Jenkins <ben@niven-jenkins.co.uk>, Amos Jeffries <squid3@treenet.co.nz>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="20cf303b40c3fd7cdf04d5667ab3"
X-Gm-Message-State: ALoCoQly20kMDWtd+hOEi1Zl7dnhwvVOa1rmYMTw62XRgXbccdUJjKyrrYQgGVqJVf5fcGPRG/4hSCTrbeWwziKRT9wrqgcgR/lMqgYurytbFMeDF+UwymwxrRwnDdrJOac+2IXXA3MUZWIUEzdVZvmW3JQsSqzCKLOb+ao0Oa4oLtebbE2FWJdmTIHbvK/5g1r7NsDE0S0E
Received-SPF: pass client-ip=209.85.216.181; envelope-from=willchan@google.com; helo=mail-qc0-f181.google.com
X-W3C-Hub-Spam-Status: No, score=-4.3
X-W3C-Hub-Spam-Report: AWL=-1.603, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1U4fa1-0004aj-0u d7584a77b60682bc7e679f1808d91cc3
X-Original-To: ietf-http-wg@w3.org
Subject: Re: http/2 prioritization/fairness bug with proxies
Archived-At: <http://www.w3.org/mid/CAA4WUYitNR0js+5m5RHfLp-7=k-mfTUKDcayW-uzJwTgOgMyYQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/16530
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>

First, I totally agree SPDY/4 prioritization changes are far more reaching.
Let's not talk about them yet. I share your complexity concern and agree we
need data before proceeding with many of those features, and I plan on
getting data.

As far as grouping, I think it's definitely a bug for the case where you
have a forward proxy with users sharing the same HTTP/2.0 connection to an
origin server. You can have many high priority short-lived streams which
can starve out others, unless we implement the vague notion of "don't
starve out streams", which is difficult when it might be a sustained rate
of high priority short-lived streams. It's easier in your latter case of
infinite, high-priority streams.

You're right that the high priority, infinite stream can starve streams
within the same group. I don't think this means that grouping is not
required, but that grouping is potentially insufficient. For intragroup
starvation, I think it's debatable about whether the server should be smart
and not allow streams to _completely_ starve other streams within a group,
or that clients should have a reprioritization facility. I think this is a
discussion worth having, but I'd personally classify it as separate from
whether or not the grouping feature is necessary.

On Sun, Feb 10, 2013 at 2:06 PM, Mike Belshe <mike@belshe.com> wrote:

>
>
>
> On Mon, Feb 4, 2013 at 5:47 PM, William Chan (陈智昌) <willchan@chromium.org>wrote:
>
>> I'm sorry if I am unclear in any way. Please continue to
>> challenge/question my comments/assertions so I can clarify my position
>> as appropriate.
>>
>> Just to be clear here, I stand by that it's a protocol bug currently.
>>
>
> +0.5.  :-)
>
> Mark - I think we could open a issue ticket with the current HTTP/2.0
> draft that this is a bug which will present itself for servers that
> implement naively.  This isn't strictly a "bug", since the spec says the
> server can do whatever it wants with priorities, but this is subtle enough
> (surfacing primarily in http/2 -> http/2 proxy situations), that many
> server implementors won't think of it unless we mention it in the spec.
>
> The bare minimum would be to simply document it and tell servers not to
> starve out streams.  However, this is probably a wimpy approach and I think
> we can do better.
>
> The SPDY/4 prioritization changes are far more reaching than just fixing
> this bug.  While I like grouping as a feature, I don't believe it actually
> fixes this bug:  a browser could open a high priority, infinite stream,
> which is competing across a shared proxy backend with other streams; unless
> the user manually switches tabs (or does something to force changed
> groups), the starvation can still occur.
>
> Mike
>
>
>
>
>
>> I agree with adding more hooks to convey advisory priority semantics.
>> That said, "advisory" is open to interpretation. I agree that the
>> sender should ultimately be in control of how it orders responses, and
>> indeed there are of course many situations where it's best for the
>> sender to ignore the advisory priority. Yet, if the advisory priority
>> semantics are generally not respected, then clients will not be able
>> to rely on them, and will be forced to implement prioritization at a
>> higher layer, which suffers from the link underutilization vs
>> contention tradeoff I highlighted earlier.
>>
>> I appreciate the concern that we're adding complexity by introducing
>> new semantics. I am arguing that because the existing mechanisms for
>> addressing starvation are suboptimal, we should treat this as a
>> protocol bug and thus change the protocol in such a way as to fix this
>> problem. My suggestion for doing so was adding new priority "grouping"
>> semantics. I am hopeful that these new semantics will not introduce an
>> inordinate amount of specification, as the primary idea is that the
>> current SPDY priority levels would apply within a "group". I think we
>> can come up with a way to define a group that will be relatively easy
>> to spec.
>>
>> SPDY/4 introduces other prioritization semantics beyond just grouping,
>> but I wanted to focus on this one first, as I believe this is a bug
>> that we *need* to fix. The other SPDY/4 priority changes are of a
>> performance optimization nature, and I believe they will need to be
>> justified by data. I have no plans to raise them up in this group
>> until we have said data.
>>
>> On Tue, Feb 5, 2013 at 5:34 AM, Poul-Henning Kamp <phk@phk.freebsd.dk>
>> wrote:
>> > Content-Type: text/plain; charset=ISO-8859-1
>> > --------
>> > In message <42A54D15-0AA3-4172-94F7-E94C86E84D7F@niven-jenkins.co.uk>,
>> Ben Nive
>> > n-Jenkins writes:
>> >
>> >>So the idea is the protocol contains enough 'hooks' to sufficiently
>> >>express the different priorities between & within groups that folks
>> >>would like to express but isn't prescriptive about how anyone uses or
>> >>implements different prioritisation, scheduling, etc schemes.
>> >
>> > That was clearly not how the original poster presented it:
>> >
>> >         "I consider all those options as suboptimal, and thus
>> >         consider this issue to be a protocol bug. Our SPDY/4
>> >         prioritization proposal addresses this by [...]"
>> >
>> > --
>> > Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
>> > phk@FreeBSD.ORG         | TCP/IP since RFC 956
>> > FreeBSD committer       | BSD since 4.3-tahoe
>> > Never attribute to malice what can adequately be explained by
>> incompetence.
>>
>>
>