Re: http/2 prioritization/fairness bug with proxies

Roberto Peon <grmocg@gmail.com> Wed, 13 February 2013 21:25 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 9DC1C21E803D for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 13 Feb 2013 13:25:07 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.534
X-Spam-Level:
X-Spam-Status: No, score=-10.534 tagged_above=-999 required=5 tests=[AWL=0.064, BAYES_00=-2.599, HTML_MESSAGE=0.001, 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 pA87ZbB-lOQk for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 13 Feb 2013 13:25:06 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 1913911E809C for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 13 Feb 2013 13:25:05 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1U5jo1-0003X7-PI for ietf-http-wg-dist@listhub.w3.org; Wed, 13 Feb 2013 21:23:53 +0000
Resent-Date: Wed, 13 Feb 2013 21:23:53 +0000
Resent-Message-Id: <E1U5jo1-0003X7-PI@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <grmocg@gmail.com>) id 1U5jnt-0003WN-HA for ietf-http-wg@listhub.w3.org; Wed, 13 Feb 2013 21:23:45 +0000
Received: from mail-ob0-f173.google.com ([209.85.214.173]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <grmocg@gmail.com>) id 1U5jns-0005rs-Je for ietf-http-wg@w3.org; Wed, 13 Feb 2013 21:23:45 +0000
Received: by mail-ob0-f173.google.com with SMTP id dn14so1764143obc.32 for <ietf-http-wg@w3.org>; Wed, 13 Feb 2013 13:23:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=OiCH5E8How+cB5VmVUQo6xEGdP3FxtUTwsPnfB2n68Y=; b=tBigGFx334xYHLeLSAkB2dMAc9Thff+Dhxd45d6G4o5RsC14KKWuK3/ql8+8FUdlbA AiqeVIACaUe2SAQ9L0Ozv5vrweqVwpRR7bE7cEiX73Sh3dQLrWdhHyEJ8c8Zyts1gTfw BXO3nS6GfoBLkWoKHm+RideUPBvi0Izl8F9wK8+tJdxKAxr6qq7JYxLXhJvS1stPJO05 PlTEJyIjoKr4Ea9U7bFxQuICgWgMkgsBUGm9aZBfb0biFu+pv0ywS494B21gASZtUsYZ RpevwD6lbLFg+3lu+gI3oe912nWrXFGHRtfABAc/rCl+0sjgUqOCO4EsIDfHxJsYCNZ+ r3Dw==
MIME-Version: 1.0
X-Received: by 10.60.172.84 with SMTP id ba20mr17391660oec.10.1360790598536; Wed, 13 Feb 2013 13:23:18 -0800 (PST)
Received: by 10.76.167.193 with HTTP; Wed, 13 Feb 2013 13:23:18 -0800 (PST)
In-Reply-To: <CAK3OfOi_L+97AyoTWaNwqznnkyFR4SAHug2twKaMUPH1jbbtBQ@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> <CAA4WUYitNR0js+5m5RHfLp-7=k-mfTUKDcayW-uzJwTgOgMyYQ@mail.gmail.com> <CABkgnnUYKDe4rZ0ZpqASkwDF2Foa_ni1rEFJH1P03k1Bv_NCog@mail.gmail.com> <CAA4WUYg+evqEMdiYSv+EZ7668eCq_dwqKiYmA4Lq-xZkoD_9Fw@mail.gmail.com> <CAK3OfOi7So1KWXdfv+UEqKAr-o1TaXiZmSmJx61WFR3J0zW_JA@mail.gmail.com> <4613980CFC78314ABFD7F85CC3027721119A440A@IL-EX10.ad.checkpoint.com> <CAK3OfOiLVfq7y4SJmoP-JyvgQc5uB8sDTrkDySMZfWqAdYf0yg@mail.gmail.com> <CAP+FsNchpZRLEfHVptV=tsLFHRP_N62QCbAcacvxoCoVhUxqkQ@mail.gmail.com> <CAK3OfOi_L+97AyoTWaNwqznnkyFR4SAHug2twKaMUPH1jbbtBQ@mail.gmail.com>
Date: Wed, 13 Feb 2013 13:23:18 -0800
Message-ID: <CAP+FsNegVDNfvzUMwyi-CqURcK_hWG26CFP-Fc=kjPsZL6LLiQ@mail.gmail.com>
From: Roberto Peon <grmocg@gmail.com>
To: Nico Williams <nico@cryptonector.com>
Cc: Yoav Nir <ynir@checkpoint.com>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="bcaec55408ac3d4cdd04d5a1c030"
Received-SPF: pass client-ip=209.85.214.173; envelope-from=grmocg@gmail.com; helo=mail-ob0-f173.google.com
X-W3C-Hub-Spam-Status: No, score=-4.4
X-W3C-Hub-Spam-Report: AWL=-1.741, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1U5jns-0005rs-Je a8ba30d9e06ff30537b88662b5d03bf5
X-Original-To: ietf-http-wg@w3.org
Subject: Re: http/2 prioritization/fairness bug with proxies
Archived-At: <http://www.w3.org/mid/CAP+FsNegVDNfvzUMwyi-CqURcK_hWG26CFP-Fc=kjPsZL6LLiQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/16597
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 Wed, Feb 13, 2013 at 12:57 PM, Nico Williams <nico@cryptonector.com>wrote:

> On Tue, Feb 12, 2013 at 12:18 PM, Roberto Peon <grmocg@gmail.com> wrote:
> > The problem that we have here is that the TCP API isn't sufficiently
> rich to
> > allow us to do the right thing (e.g. read bytes without allowing the
> sender
> > to send more). As a result, we have to have another level of flow control
>
> That's not necessary here.
>
> There are two issues here:
>
> a) flow [and congestion] control;
> b) prioritization of "interactive" or "control" traffic over bulk traffic.
>

We have more levels of prioritization than just that, but yes.


>
> These are exactly the same issues that have been faced in SSHv1 and SSHv2.
>
> TCP can handle (a), but if you multiplex traffic of different QoS over
> one TCP connection you run into the issues that SSHv1 and v2 have run
> into.
>

Agreed -- varying QoS for packets on a single in-order stream (i.e.
connection) basically don't help, even if the network did the right thing
with them, which it may not.
Even if the network does the right thing and the bytes have arrived, TCP's
API still only lets you access the packets in-order.



>
> There's two ways to address these issues: either don't it (it ==
> multiplex diff QoS traffic over the same TCP conn.) or try hard never
> to write more than one BDP's worth of bulk without considering higher
> priority traffic.


QoS for packets on multiple connections also doesn't work- each entity
owning a connection sends at what it believes is its max rate, induces
packet loss, gets throttled appropriately, and then takes too make RTTs to
recover. You end up not fully utilizing the channel(s).



>  Determining BDP is non-trivial and it can vary, but
> it's reasonable to estimate it by looking at round-trip times (it'd be
> nice if TCP could expose that to apps so they don't have to measure it
> redundantly!) and growing send bandwidth until receive bandwidth stops
> growing -- not exactly trivial, but reasonable.
>
>
The hard part is "considering higher priority traffic" when that traffic is
being send from a different machine, as would occur in the multiple
connection case.
With a single connection, this is easy to coordinate. Agreed that
estimating BDP isn't trivial (however it is something that TCP effectively
has to do).


> Now, in practice browsers already use multiple TCP connections to the
> same server anyways, so... what's wrong with per-priority TCP
> connections?  (see below)
>
> > which we'd otherwise be able to do without. Unfortunately, per priority
> TCP
> > connections don't work well for large loadbalancers where each of these
> > connections will likely be terminating at a different place. This would
> > create a difficult synchronization problem server side, full of races and
> > complexity, and likely quite a bit worse in complexity than getting flow
> > control working well.
>
> I think you're saying that because of proxies it's difficult to ensure
> per-priority TCP connections, but this is HTTP/2.0 we're talking
> about.  We have the power to dictate that HTTP/2.0 proxies replicate
> the client's per-priority TCP connection scheme.
>


No, I'm saying that it is somewhere between difficult and impossible to
ensure that separate connections from a client end up on one machine in the
modern loadbalancer world.
>From a latency perspective, opening up the multiple connections can be a
loss as well-- it increases server load for both CPU and memory and vastly
increases the chance that you'll get a lost-packet on the SYN which takes
far longer to recover from as it requires an RTO before RTT has likely been
computed.


> > Note that the recommendation will be that flow control be effectively
> > disabled unless you know what you're doing, and have a good reason
> (memory
> > pressure) to use it.
>
> Huh?  Are you saying "we need and will specify flow control.  It won't
> work.  Therefore we'll have it off by default."  How can that help?!
> I don't see how it can.
>
>
Everyone will be required to implement the flow control mechanism as a
sender.
Only those people who have effective memory limitations will require its
use when receiving (since the receiver dictates policy for flow control).

-=R


> Nico
> --
>