Re: http/2 prioritization/fairness bug with proxies

William Chan (陈智昌) <willchan@chromium.org> Mon, 04 February 2013 16:44 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 804F321F85B4 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 4 Feb 2013 08:44:05 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.182
X-Spam-Level:
X-Spam-Status: No, score=-9.182 tagged_above=-999 required=5 tests=[AWL=0.495, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, 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 5DpMUHGQdW9l for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 4 Feb 2013 08:44:04 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 7C3CF21F84D1 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 4 Feb 2013 08:44:04 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1U2P85-0002zH-FH for ietf-http-wg-dist@listhub.w3.org; Mon, 04 Feb 2013 16:42:49 +0000
Resent-Date: Mon, 04 Feb 2013 16:42:49 +0000
Resent-Message-Id: <E1U2P85-0002zH-FH@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <willchan@google.com>) id 1U2P7y-0002yB-4y for ietf-http-wg@listhub.w3.org; Mon, 04 Feb 2013 16:42:42 +0000
Received: from mail-qa0-f51.google.com ([209.85.216.51]) by lisa.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <willchan@google.com>) id 1U2P7x-0002lC-7M for ietf-http-wg@w3.org; Mon, 04 Feb 2013 16:42:42 +0000
Received: by mail-qa0-f51.google.com with SMTP id cr7so1363462qab.17 for <ietf-http-wg@w3.org>; Mon, 04 Feb 2013 08:42:15 -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=FMa5/Dk4IYrOjHUJIgcR/rrCm0+JDMYqIITDtU90Sio=; b=GB0gfqJ+4ldnDcHBSA/ZqHSrx+0GKob06GjBoEvXn/O33pPFDEGhTEka6Am1ksuorv /G3wa8jbx/9X2kP2vCkJtmhH3PaGNKnIQVU4Y1Uk5djJ4WpoEuojys+9PfMM4GP8cTBG D3Tc6vAGU00rAmtfVRFxmn9AlH79fk1RilSdIMzosBYEaV02dNdAKhezhd3xTKjbT5lP ARo53IHpzxqd0ukqEPhuiBWD7HlmKzfLgBnYH62S4KO345zLdUyRpDuxNxgD0Cx6Lr/3 RgpN8JyQFIAXY5aS02tuOKRziFihEtUd5Y1D1gaQiZzR9RCoDe0yXLZzsEWcUnLL5PBU Cx6w==
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=FMa5/Dk4IYrOjHUJIgcR/rrCm0+JDMYqIITDtU90Sio=; b=K9LNUWO0mNWtVXVEldZEwgzLSB5T8V+iubB4AScFJgl1EECUXMZUiTgPY3wfAbB7dr PZcxb5ZShMv4EdqIiSKFaijkjAAMUXU5793iJ15KiJRz12DQmUfF9dqjmqu+cqbF0YhQ eSX6stD9FMUQ9Lxx2E0h43QPJ9FQoWlCIDOIg=
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=FMa5/Dk4IYrOjHUJIgcR/rrCm0+JDMYqIITDtU90Sio=; b=K45tOxNPrAfjJDFVp4otDhRXg1v8s311StwWTiZeOU3Gpuj4ANYD2Pz2Ph4PglFBkZ jMFIZ8gBJbfEoiu1TR32aymsO4kCIiHF5I8hHPzjFjMv3nKGwwOWn98OHO5f01dr4EUC waqLp6X5h0HAc4zz9qkPUVo6xEHaYyk7h+iVuVNe0ET5p59AQiCEerPzVaBedgqICkyB GE97mKGAGgO0v2zq0iTKJGQiCG/b175ga13rngI4xNTiaopCjOI/f0QdqhDz1yCIYoQA Q+CZftftGEntPuJDvETpUjZi9MaPve2awbzmZMwJTCLF0jw8DTINbZ83P0cG0YLlMfHx Ry4g==
MIME-Version: 1.0
X-Received: by 10.49.130.167 with SMTP id of7mr21661934qeb.22.1359996135086; Mon, 04 Feb 2013 08:42:15 -0800 (PST)
Sender: willchan@google.com
Received: by 10.229.57.163 with HTTP; Mon, 4 Feb 2013 08:42:14 -0800 (PST)
In-Reply-To: <510F72CE.8030003@treenet.co.nz>
References: <CAA4WUYjiBZpShKKFfHQnixc94aOLrck0oR4ykARB=hF5h8nkfA@mail.gmail.com> <3430.1359961022@critter.freebsd.dk> <510F72CE.8030003@treenet.co.nz>
Date: Tue, 05 Feb 2013 01:42:14 +0900
X-Google-Sender-Auth: K2jnhcOJv9IpwBL82F3rBz-vOaE
Message-ID: <CAA4WUYiBJrLjM0-vurFOuJfUaabXtK=W8N5z28yshSfrvD9crg@mail.gmail.com>
From: "William Chan (陈智昌)" <willchan@chromium.org>
To: Amos Jeffries <squid3@treenet.co.nz>
Cc: HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="ISO-8859-1"
X-Gm-Message-State: ALoCoQnfPHbWMDRANadftzKIkneP33QIyH7sd/YsqQsm8Gs0HPXY06k4YANVRXOvB0cd2pkLnn4N3IVPVr5TZw1Rahx9QUbPNfJZslSiVWHFfCRXB4nc/EBUzvYSeXgE/OqVsFAomDFwe79YYJ3u81FC4+wJwzbtpp3oSs9pX1EhryCO+ziAhAEzAoAjhD5QEMDRx68+rGvX
Received-SPF: pass client-ip=209.85.216.51; envelope-from=willchan@google.com; helo=mail-qa0-f51.google.com
X-W3C-Hub-Spam-Status: No, score=-3.3
X-W3C-Hub-Spam-Report: AWL=-2.527, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001
X-W3C-Scan-Sig: lisa.w3.org 1U2P7x-0002lC-7M f994a675e8fb06c5b3c816737554cd08
X-Original-To: ietf-http-wg@w3.org
Subject: Re: http/2 prioritization/fairness bug with proxies
Archived-At: <http://www.w3.org/mid/CAA4WUYiBJrLjM0-vurFOuJfUaabXtK=W8N5z28yshSfrvD9crg@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/16355
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 Mon, Feb 4, 2013 at 5:35 PM, Amos Jeffries <squid3@treenet.co.nz> wrote:
> On 4/02/2013 7:57 p.m., Poul-Henning Kamp wrote:
>>
>> Content-Type: text/plain; charset=ISO-8859-1
>> --------
>> In message
>> <CAA4WUYjiBZpShKKFfHQnixc94aOLrck0oR4ykARB=hF5h8nkfA@mail.gmail.com>
>> , =?UTF-8?B?V2lsbGlhbSBDaGFuICjpmYjmmbrmmIwp?= writes:
>>
>>> Anyway, the existing prioritization bug is as follows:
>>
>> [...]
>>
>>> The backend server
>>> obviously can't do this because it doesn't (at least, shouldn't!) know
>>> the clients behind the proxy.
>>
>> This flies counter to vast experience:  Servers do almost everything
>> they can to identify the actual client (X-F-F, cookies, fingerprinting
>> etc), so I think this premise needs to be rethought.

Sorry, I wasn't clear. I meant within the protocol itself. You're
absolutely correct that there are methods of identifying particular
clients. That said, as Mark notes, one of the original use cases
motivating this discussion is the tabbed browser case. I like to think
of a browser network stack as a proxy, servicing network requests for
the various tabs. While other methods do exist to handle identifying
particular tabs, they aren't particularly good ones.

But let's return to the premise. Do you believe it's better to rely on
these client fingerprinting methods to implement prioritization,
rather than providing more explicit signals in the protocol itself?

>>
>>> 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 using stream groups with advisory (all this is
>>> advisory after all) [...]
>>
>> So what does the groups buy you, for all the complexity they add ?
>>
>> As far as I can tell:  Nothing.

I'm sorry I didn't address this in the first email. I confess I
thought it was obvious. Grouping lets you do relative prioritization
within a group, as opposed to across the entire session.

>>
>> I think the priority should simply be documented as advisory and
>> mention that intermediaries SHOULD respect them, subject to
>> local administrative policy, and leave it at that.
>>
>> The current proposal is complex enough as it is, adding complexity
>> to not solve problems that cannot be solved technically, is not
>> an improvement.
>
>
> +1. There are a lot of queuing, scheduling, and load balancing algorithms
> out there for the proxy to choose from and likely to be more or better ones
> found going forward.
> The proxy is already in a position to group (or not), or to simply delay I/O
> as necessary to make things fair for all clients according to their priority
> hints. A SHOULD is enough.

AFAICT, delaying I/O is a suboptimal solution. Since client-side
advisory priorities informs the server of the response ordering, a
proxy which passes through the same priorities will allow higher
priority stream responses to starve lower priority ones. In your
proposed solution of delaying I/O, the proxy would need to withhold
WINDOW_UPDATE frames for streams that it wants to deprioritize, in
order to prevent the server from sending the response data for the
higher priority streams. In effect, this uses the stream receive
window mechanism to implement prioritization. I think that having the
receiver implement prioritization via receive windowing is worse than
having the client inform the server of advisory priorities and letting
the sender (the server) order as appropriate.

>
> Amos
>