Re: Overhead of HTTP/2 Stream Management.

Willy Tarreau <w@1wt.eu> Sun, 05 April 2015 18:40 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@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 (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 539801ACD7A for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 5 Apr 2015 11:40:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.912
X-Spam-Level:
X-Spam-Status: No, score=-6.912 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3iYeWRqLzzNK for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 5 Apr 2015 11:40:22 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C471E1ACD7C for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 5 Apr 2015 11:40:20 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1YepQ7-0000Nh-Lc for ietf-http-wg-dist@listhub.w3.org; Sun, 05 Apr 2015 18:37:19 +0000
Resent-Date: Sun, 05 Apr 2015 18:37:19 +0000
Resent-Message-Id: <E1YepQ7-0000Nh-Lc@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.80) (envelope-from <w@1wt.eu>) id 1YepQ4-0000Mw-JM for ietf-http-wg@listhub.w3.org; Sun, 05 Apr 2015 18:37:16 +0000
Received: from wtarreau.pck.nerim.net ([62.212.114.60] helo=1wt.eu) by maggie.w3.org with esmtp (Exim 4.80) (envelope-from <w@1wt.eu>) id 1YepQ3-0000pq-JX for ietf-http-wg@w3.org; Sun, 05 Apr 2015 18:37:16 +0000
Received: (from willy@localhost) by pcw.home.local (8.14.3/8.14.3/Submit) id t35IapCt011554; Sun, 5 Apr 2015 20:36:51 +0200
Date: Sun, 05 Apr 2015 20:36:51 +0200
From: Willy Tarreau <w@1wt.eu>
To: Max Bruce <max.bruce12@gmail.com>
Cc: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Message-ID: <20150405183651.GA11551@1wt.eu>
References: <CABb0SYTLVFYXymJ75TkNkku3oT5pRcSAahjq2HcD5gDLouskpA@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CABb0SYTLVFYXymJ75TkNkku3oT5pRcSAahjq2HcD5gDLouskpA@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Received-SPF: pass client-ip=62.212.114.60; envelope-from=w@1wt.eu; helo=1wt.eu
X-W3C-Hub-Spam-Status: No, score=-4.0
X-W3C-Hub-Spam-Report: AWL=-2.023, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: maggie.w3.org 1YepQ3-0000pq-JX 2ec46e9cf7d8e82eedd1f17cb0f90c0a
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Overhead of HTTP/2 Stream Management.
Archived-At: <http://www.w3.org/mid/20150405183651.GA11551@1wt.eu>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/29263
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 Sun, Apr 05, 2015 at 11:08:50AM -0700, Max Bruce wrote:
> I'm in the process of implementing HTTP/2 into Avuna, and I have a question.
> >From a performance point of view, why do streams maintain a open/close
> state? There seems to be a considerable overhead for it, yet it doesn't
> seem necessary. Think of packet IDs in DNS, it just returns with the same
> ID to say it is a response to a specific request. What is the benefit of a
> detailed stream-like system, versus a simple request/response identifier?

HTTP is a bit more complete than a simple request/response model. For
example when sending a body accompanying a POST, you need to reference
the request the data belong to. Also the push mechanism requires to
associate the pushed requests/responses with an existing request, so
it makes sense to use IDs there as well.

In general, since the streams are multiplexed, I hardly see how you
could get rid of stream IDs. I think you were thinking about the existing
pipeline mode of HTTP/1 which forces all responses to be delivered in the
same order as the requests and which suffers from massive head-of-line
blocking.

With that said, I agree that H/2 is not easy to implement, but for now
my experience is that re-architecturing existing programs to support
multiple streams over a single connection is probably much more
difficult than implementing the protocol itself, though this will
obviously depend on the programs of course.

Regards,
Willy