Re: http/2 prioritization/fairness bug with proxies

William Chan (陈智昌) <willchan@chromium.org> Tue, 19 February 2013 02: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 1658421F8D46 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 18 Feb 2013 18:42:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.372
X-Spam-Level:
X-Spam-Status: No, score=-9.372 tagged_above=-999 required=5 tests=[AWL=0.304, 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 MLQwShHwgRr8 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 18 Feb 2013 18:42:36 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id B95BF21F8D31 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 18 Feb 2013 18:42:25 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1U7d8R-0002wJ-Qi for ietf-http-wg-dist@listhub.w3.org; Tue, 19 Feb 2013 02:40:47 +0000
Resent-Date: Tue, 19 Feb 2013 02:40:47 +0000
Resent-Message-Id: <E1U7d8R-0002wJ-Qi@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 1U7d8H-0002v9-Mo for ietf-http-wg@listhub.w3.org; Tue, 19 Feb 2013 02:40:37 +0000
Received: from mail-qe0-f49.google.com ([209.85.128.49]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <willchan@google.com>) id 1U7d8G-0000ms-7N for ietf-http-wg@w3.org; Tue, 19 Feb 2013 02:40:37 +0000
Received: by mail-qe0-f49.google.com with SMTP id 5so2803765qea.36 for <ietf-http-wg@w3.org>; Mon, 18 Feb 2013 18:40:10 -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=MIaljpE66FoTx4z/RROGhPqdQcsicvqZm/SO0E6MCvY=; b=nE+GjTNMr63IZGmYXA9w8m+vQq2+NV/vDJSE5LnVdIB2KuKRhh03E11UHYqy+Javgo KNjOWM8MnVWt+IJOEFIcYO60fuP9LijkOoRQFANc5agREum8HxCEDnweTfwobijuX8Hm STrOAtXDdfiYsV3mk6ZmcfduM0QpLMsUD9XTRunFE7TBaBrHINbjU6Dp+zEgXRvUavhk h0NkZ2VaenhV/n5+ptqsAl9/1b5ULevULQ94VjMEgdQVzm/ItExuvXLoBx6ZUneCWmWg nTTeprIUAptK3KlLuC08mYGlRYR4KzVvpytOw2+mTrEnBNPJRH7T7Cor0ECJdWCPZMXu ij/g==
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=MIaljpE66FoTx4z/RROGhPqdQcsicvqZm/SO0E6MCvY=; b=A76BSBKQPBqqB/HC9/JnxkUt2q5aeaD1s3lezD2ngvTScc2ZaT3tk0Gb5k2Ip9DsSB GGofEpQjNMbOtoeWYyT5cEu4znhngb9Q/NdwFjSMwzdGcAd0FA7pQKUFE/nI8ijJR+vr MtxR1C9/D5m0ZON4F4ud/0YsVTLXbAerzLWCU=
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=MIaljpE66FoTx4z/RROGhPqdQcsicvqZm/SO0E6MCvY=; b=gsseuYYFDjIm965PIvmnB205pmh4M0GJSv47BRWft1lim74sWW5tTcw0ab8HZp7zoo 6nCAYxl48NepQ5Bxn5Y/Z8JgU8r/VJmkvElaPeQE7qxkUeF+LZMc58fFt4096J728w6Q 9WwP+bp3j1+6A8QrruFUO6FfItuGUGfwfB7Y7CyFcf7OKYK63B2OFopC36oGbN61Z6BT vpQ3H3zg7LbQHd62JhR3RH6sWEjTUHiy9PFP4XbXKsHSgiLyXNOBG/lj4VwLmmQIWLIJ 6//ChG+db/CqNgufN2wY+6K80pabscprivAH5APfe/+JKGlNbbKyl3AZPAsxynGosmQI zBMg==
MIME-Version: 1.0
X-Received: by 10.49.48.113 with SMTP id k17mr6323578qen.51.1361241609915; Mon, 18 Feb 2013 18:40:09 -0800 (PST)
Sender: willchan@google.com
Received: by 10.229.135.210 with HTTP; Mon, 18 Feb 2013 18:40:09 -0800 (PST)
In-Reply-To: <CAK3OfOhA6E5EE_+CsH_hPppsKjpLGV81hc_t7qC_VwXJF1y4VQ@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> <CAP+FsNegVDNfvzUMwyi-CqURcK_hWG26CFP-Fc=kjPsZL6LLiQ@mail.gmail.com> <CAK3OfOismYttmF5b5k+Qews-NLe+F5QfKNY5tXXmkv4R4EMr7w@mail.gmail.com> <CAP+FsNcGWnUooJdQ6b0EcpArc7-GvW2-SNatwS-=cK+E1j4b_g@mail.gmail.com> <CAK3OfOgcjfffBTW0tbdd3Du8_b5qAAbDieHrDAFCRufwxoCVVw@mail.gmail.com> <CAP+FsNeEBLiJ8oLaU+HbQOcxK3Jgt6vrzvx9j4=b5xWRMqBOOg@mail.gmail.com> <CAK3OfOhA6E5EE_+CsH_hPppsKjpLGV81hc_t7qC_VwXJF1y4VQ@mail.gmail.com>
Date: Mon, 18 Feb 2013 18:40:09 -0800
X-Google-Sender-Auth: Xa_by9Gz0ftmh6DOcQvis2CEhEI
Message-ID: <CAA4WUYji_fQe-P0AX76hMxerwMx_bUt_mzdT-jzcB0JcK-YmQQ@mail.gmail.com>
From: "William Chan (陈智昌)" <willchan@chromium.org>
To: Nico Williams <nico@cryptonector.com>
Cc: Roberto Peon <grmocg@gmail.com>, Yoav Nir <ynir@checkpoint.com>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="047d7b6da4609ccf4f04d60ac2df"
X-Gm-Message-State: ALoCoQnbtRSVbhBBo6Gjtnm9VlsSQCFFg9ZCedRQxqTSbVaNh99UnrUG0BUulUGvPOpsckSUZuscxLe1KLVh2/Yp758okXc47EOU9zi4lL00W63JElVA/b8HEA1HNKQ1HCI4T/iutfWXYlvmjYHFv8XNZ14O4izIMMBEUjhhvutlksX97b+LNtLkpBkZ+lOEiZGRBSkqBnvZ
Received-SPF: pass client-ip=209.85.128.49; envelope-from=willchan@google.com; helo=mail-qe0-f49.google.com
X-W3C-Hub-Spam-Status: No, score=-3.7
X-W3C-Hub-Spam-Report: AWL=-2.394, 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.554, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1U7d8G-0000ms-7N d923b70a3950a2933e3fe69ea72de0ef
X-Original-To: ietf-http-wg@w3.org
Subject: Re: http/2 prioritization/fairness bug with proxies
Archived-At: <http://www.w3.org/mid/CAA4WUYji_fQe-P0AX76hMxerwMx_bUt_mzdT-jzcB0JcK-YmQQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/16668
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>

I'm happy to see that like what happened in the other thread, lots of the
disagreement ultimately was due to confusion over what was actually being
discussed. For prioritization, let's remember that we are discussing the
stream prioritization mechanism as described in the draft spec (
http://htmlpreview.github.com/?https://github.com/http2/http2-spec/blob/master/draft-ietf-httpbis-http2.html#StreamPriority)
which expresses the order in which the client advises the server to service
streams.

As before, I'd like to reiterate (and I believe most people have agreed
here) that we should not use receive windows to achieve prioritization.

Nico, I think the discussion of whether or not HTTP/2 stream prioritization
is useful for different traffic classes is a useful discussion to have. I
suggest starting a separate thread, so we don't incorrectly conflate it
with the stream prioritization issue I raised here.

On Mon, Feb 18, 2013 at 6:07 PM, Nico Williams <nico@cryptonector.com>wrote:

> On Thu, Feb 14, 2013 at 3:42 PM, Roberto Peon <grmocg@gmail.com> wrote:
> > On Thu, Feb 14, 2013 at 12:26 PM, Nico Williams <nico@cryptonector.com>
> > wrote:
> >> But it's possible that we're talking about different thing.  One thing
> >> is priority for server processing of requests.  Another is for proxies
> >> -- here we have to start worrying about the multiplexing issues that
> >> SSHv1 and SSHv2 have had, and since I think we ware talking about
> >> proxies I keep coming back to these issues.
> >
> > Priority and flow control are separate issues.
> > Priorities are an expression of the order in which the browser
> wants/needs
> > resources.
>
> Ah, if that's all priorities do, then there's no issue.  However, if
> they relate to traffic classes (bulk vs. non-bulk) then we have the
> SSH problems.
>
> > Flow control is for receivers which are memory constrained to be sure
> that
> > they won't overrun memory requirements.
>
> It's for sinks that are slow.  All receivers are memory constrained, after
> all.
>

Correct, although browsers typically are less concerned than servers. But
that's generally because their sinks (CPU processing) are generally faster
than the sources (network) for HTTP traffic.


>
> >> > From an implementation standpoint: I'm already running out of
> ephemeral
> >> > port
> >> > space. I *do Not* want to use more connections.
> >>
> >> It's certainly what browsers do already, and have for many years.
> >> What's the problem?
> >
> > Browsers do this because HTTP effectively limits you to one outstanding
> > request per connection, which is effectively one request per RTT per
> > connection.
>
> Pipelining allows multiple requests to be sent before responses are
> written back.  The problem is that responses must be written in the
> same order as the requests.  The solution to that would be to add an
> XID (like basically any RPC protocol would, e.g., ONC RPC).


> > Allowing a larger concurrency per connection than 1 is what the
> multiplexing
> > does.
>
> I suspect that's not the only reason that browsers make multiple
> concurrent connections to servers.  To be fair, the SSH problems can't
> the reason either.
>

As a browser vendor, I can say that the primary reason to use multiple
connections is to achieve parallelization without head of line blocking. A
downside of multiple connections is increased contention (primarily
bandwidth) which can definitely slow down page load. We currently do not do
anything smart with regard to bulk transfers (like downloads). It's
possible we could try to use TCP receive windows to control this, but I'd
rather not go there as it's difficult to get right. I know that Patrick has
expressed interest in dabbling here for Firefox, so I guess this is one of
those situations where I'm more conservative than he. I look forward to him
gathering results first :)


> > Browsers are most often not the ones likely to run out of ephemeral port
> > space-- that is a problem for proxies and servers.
>
> Ah!  This is a good thing to point out.  But note that proxies are in
> a decent position to know if SCTP can work (namely, they can cache
> which servers it's worked for and which it hasn't).  So an SCTP
> binding of HTTP might still be useful.
>

Alternative transports may indeed be useful. But let's focus on TCP for
now, and just keep other possible transports in mind, as per the charter.


>
> >> > From an implementation standpoint: It is often impossible to figure
> out
> >> > that
> >> > k connections belong to a single client at all loadbalancers without
> >> > sacrificing orders of magnitude of performance. Orders of magnitude,
> not
> >> > just a factor of X.
> >>
> >> But I'm not saying you need to do that.  Nor am I implying it.
> >
> > If there are multiple connections, then the cost of coordination for this
> > kind of loadbalancing at large sites is orders of magnitude higher.
> > You're telling me that you wish to use multiple connections. Unless my
> > statement above is a lie, it must then follow that it will cost orders of
> > magnitude more for the same coordination.
>
> I'm telling you that if SSH multiplexing/flow control issues arise
> then the best solution is to have two TCP connections: one for bulk,
> and one for non-bulk.  Bulk/not-bulk adds a single boolean input to
> the routing process.  I don't see how that raises the cost of load
> balancing by one order of magnitude, much less two, not unless issues
> like scarcity of ephemeral ports are the root cause (load balancers
> are unlikely to have this problem, but proxies are).
>

I think the discussion of what mechanism to utilize to address different
traffic classes is a good one to have, but should be done in a separate
thread.


>
> >> > Browsers have used multiple connections because of limitations in
> HTTP,
> >> > which we're already solving with multiplexing.
> >>
> >> I strongly suspect that you're not solving them.  It's not just "oh,
> >> let's multiplex".  You need to watch out for the issues other
> >> protocols that multiplex different flows on single TCP flows have had.
> >>  You haven't demonstrated a grasp of those issues.
> >
> >
> > Nico, I've been working closely with browser folks for quite a while
> (years)
> > and have a good grounding in what is suboptimal today, after all, SPDY
> > started as a project with a server/proxy developer (me) and a browser
> > developer (Mike Belshe).
>
> You're right, I did not express myself very well.  I apologize.  I am
> concerned with any notion of flow control layered above TCP.  I'm not
> as concerned about priorities now that I understand their purpose (I
> did suspect we might be talking about different things.)
>

If you have concerns about the flow control proposal, please respond to
them there.
http://lists.w3.org/Archives/Public/ietf-http-wg/2013JanMar/0714.html is
the current thread on the topic.


>
> Nico
> --
>
>