Re: multiplexing -- don't do it

Mike Belshe <mike@belshe.com> Wed, 04 April 2012 22:07 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 053D811E80C2 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 4 Apr 2012 15:07:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.914
X-Spam-Level:
X-Spam-Status: No, score=-9.914 tagged_above=-999 required=5 tests=[AWL=0.062, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F2BjmrXQheld for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 4 Apr 2012 15:07:56 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id C7FD311E80D2 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 4 Apr 2012 15:07:55 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.69) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1SFYLO-0001QN-4x for ietf-http-wg-dist@listhub.w3.org; Wed, 04 Apr 2012 22:06:22 +0000
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.69) (envelope-from <mike@belshe.com>) id 1SFYLE-0001Ma-PJ for ietf-http-wg@listhub.w3.org; Wed, 04 Apr 2012 22:06:12 +0000
Received: from mail-iy0-f171.google.com ([209.85.210.171]) by lisa.w3.org with esmtp (Exim 4.72) (envelope-from <mike@belshe.com>) id 1SFYLA-0006rv-TA for ietf-http-wg@w3.org; Wed, 04 Apr 2012 22:06:10 +0000
Received: by iadj38 with SMTP id j38so1100942iad.2 for <ietf-http-wg@w3.org>; Wed, 04 Apr 2012 15:05:43 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=uJSHnWCdwio2XkEEBMT/exrOcKFLwOMdXMGEt6PDsuU=; b=amFHU6QGYWRIMh10eJ8NPOibpgfPLw3M8c4uidvDzNdhE1MjXw/08CQPTiI+IwOiJl 7+M9KZlJjVT9dUdWsmPNoxTN04eQ/WlksxGmop86X6M+lo4/fYXbmIJlA16Gi2dyoXIq 9nm+9i72i3h56VptlCJYOLX2qDWR7GQ6p7oYLrMSWGErwmR0Kq56u+0z2IlSE2GuFvRm Uga7x7z8ziuUH3dJlPDF9I91eY3IHkMgpV5bdVEklVZ8w1ZyF4BVI0N79s/3woTME5Yl T+B2TOHRN5P7VZGYC0gXkvUL2wqcozdo1DOxej9pOEOdW92ly3tyg7hnY5IA37DGNMIu rTAQ==
MIME-Version: 1.0
Received: by 10.50.216.132 with SMTP id oq4mr184058igc.6.1333577143766; Wed, 04 Apr 2012 15:05:43 -0700 (PDT)
Received: by 10.50.91.162 with HTTP; Wed, 4 Apr 2012 15:05:43 -0700 (PDT)
In-Reply-To: <CANmPAYE0LSa4_t9C663BBdnbRgAX-tXNqmjrQ0CFNTUv9Q6g=A@mail.gmail.com>
References: <58913.1333522938@critter.freebsd.dk> <1333544863.2147.446.camel@ds9> <CANmPAYE0LSa4_t9C663BBdnbRgAX-tXNqmjrQ0CFNTUv9Q6g=A@mail.gmail.com>
Date: Wed, 04 Apr 2012 15:05:43 -0700
Message-ID: <CABaLYCtVKPJP5GQqkeOHtwpHonPBBzqx0zL_xJjiNs_XrSF1Cg@mail.gmail.com>
From: Mike Belshe <mike@belshe.com>
To: Peter Lepeska <bizzbyster@gmail.com>
Cc: Patrick McManus <pmcmanus@mozilla.com>, Poul-Henning Kamp <phk@phk.freebsd.dk>, Willy Tarreau <w@1wt.eu>, "William Chan (?????????)" <willchan@chromium.org>, "Roy T. Fielding" <fielding@gbiv.com>, "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="14dae934048fef4d8604bce19fed"
X-Gm-Message-State: ALoCoQmYB9JW6axyEmwYDd1teUDNnGtzKMEPGu6yKVb/ukPf9Yfhpy4UdEEBC6ZL2c2miEDymkMs
Received-SPF: none client-ip=209.85.210.171; envelope-from=mike@belshe.com; helo=mail-iy0-f171.google.com
X-W3C-Hub-Spam-Status: No, score=-2.6
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7
X-W3C-Scan-Sig: lisa.w3.org 1SFYLA-0006rv-TA b628b345d8af973613726ea2aaf05784
X-Original-To: ietf-http-wg@w3.org
Subject: Re: multiplexing -- don't do it
Archived-At: <http://www.w3.org/mid/CABaLYCtVKPJP5GQqkeOHtwpHonPBBzqx0zL_xJjiNs_XrSF1Cg@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/13300
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>
Resent-Message-Id: <E1SFYLO-0001QN-4x@frink.w3.org>
Resent-Date: Wed, 04 Apr 2012 22:06:22 +0000

On Wed, Apr 4, 2012 at 1:58 PM, Peter Lepeska <bizzbyster@gmail.com> wrote:

> As long as SPDY is sent over TCP, it also suffers from HOL problems, just
> not as bad as pipelining.
>
> I think SPDY (or whatever the HTTP 2.0 muxing protocol is) should framed
> in such a way that if running over a protocol like SCTP, that solves the
> HOL problems, we should be able to take advantage of it. Due to gzip
> compression of headers, even if the transport allowed me to grab messages
> out of order, I'd still have to wait for all packets prior in order to
> decode the HTTP headers.
>


I think people have confusion about layering on top of transport protocols.
 Any time you have an app protocol that wants to take advantage of new
transport features you *MUST* change the definition of how the app protocol
is bound to the lower level transport.  This absolutely applies to HTTP and
TCP/SCTP (not talking about SPDY yet).  For example, RFC2616 does *not*
specify how to use HTTP over SCTP, and a whole I-D exists for that:
http://tools.ietf.org/html/draft-natarajan-http-over-sctp-01  This I-D
defines one possible binding between HTTP and SCTP, but others could exist
too.

Why is this necessary?  Well, TCP has a single, bidirectional stream.  SCTP
doesn't have bi-directional streams at all, and instead only has multiple,
uni-directional streams.  So, if you want to leverage the new feature
(streams) you need to define how you're going to bind onto it.  It's
trivial, but doable.

If we had SCTP, we wouldn't do MUX and SPDY.  It's redundant.  That's not
to say that HTTP/2.0 is worse with multiplexing, its just to say that we
wouldn't need to consider it if the transport already had it.  But SCTP is
not viable today or even within the next decade.

Google sponsored a project at the Univ of Delaware where they investigated
SPDY over SCTP already.  A couple of bindings for SPDY over SCTP were
considered:  use stream 0 for a control stream, and send the headers over
that stream.  This has the nice property that it binds the stateful
compression to a single, in-order stream.  Also, as you can imagine, it
introduces a small amount of HoL there.  Another solution was to use N SCTP
streams, with M mux'd SPDY streams on top of it.  Other such bindings could
be considered.  Overall, SCTP was too immature to really benchmark.  The
FreeBSD and Linux implementations of SCTP have many problems already.  The
UoD guys might want to comment, I found the whole thing non-conclusive.

My recommendation:
Designing HTTP/2.0 for SCTP is a mistake and should NOT be a requirement.
 SCTP is not a viable transport over the Internet today, and will not be in
the foreseeable future.  When it is available, an appropriate binding for
HTTP/2.0 can be determined, trivially, and we can worry about it then.
 This is the same approach that was taken for HTTP with
http://tools.ietf.org/html/draft-natarajan-http-over-sctp-01.

Mike




>
> Peter
>
>
> On Wed, Apr 4, 2012 at 9:07 AM, Patrick McManus <pmcmanus@mozilla.com>wrote:
>
>> On Wed, 2012-04-04 at 07:02 +0000, Poul-Henning Kamp wrote:
>> > In message <20120404054903.GA13883@1wt.eu>, Willy Tarreau writes:
>> >
>> > >> I'm starting to get data back, but not in a state that I'd reliably
>> > >> release. That said, there are very clear indicators of intermediaries
>> > >> causing problems, especially when the pipeline depth exceeds 3
>> requests.
>> >
>> > I always thought that the problem in HTTP/1.x is that you can never
>> > quite be sure if there is an un-warranted entity comming after at GET,
>>
>> its not uncommon to have the consumer RST the whole TCP session when
>> asked to recv too far beyond the current request it is processing. For
>> some devices "too far" appears to be defined as "any new packet". I
>> presume some variation of this is where Will's data point comes from.
>> (Often 3 uncompressed requests fit in 1 packet).
>>
>> That class of bug sounds absurd, but its really a pretty common pattern.
>> As an example: hosts that fail TLS False Start (for which I understand
>> second hand that Chrome needs to keep a black-list), react badly because
>> there is TCP data queued when they are in a state that the expect their
>> peer to be quiet. Same pattern.
>>
>> The lesson to me is that you want to define a tight set of functionality
>> that is reasonably testable up front - and that's what you can depend
>> widely on later. Using anything beyond that demands excessive levels of
>> pain, complexity, and cleverness.
>>
>> (and all this pipelining talk as if it were equivalent to spdy mux is
>> kind of silly. Pipelining's intrinsic HOL problems are at least as bad
>> of an issue as the interop bugs.)
>>
>> -Patrick
>>
>>
>>
>