Re: HTTP router point-of-view concerns

Roberto Peon <> Thu, 11 July 2013 03:15 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 27B7B21F8EFE for <>; Wed, 10 Jul 2013 20:15:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -10.532
X-Spam-Status: No, score=-10.532 tagged_above=-999 required=5 tests=[AWL=0.066, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-8]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id WrfG3J7b5RvK for <>; Wed, 10 Jul 2013 20:15:52 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id 23A6911E80BA for <>; Wed, 10 Jul 2013 20:15:51 -0700 (PDT)
Received: from lists by with local (Exim 4.72) (envelope-from <>) id 1Ux7Kw-00082q-UW for; Thu, 11 Jul 2013 03:14:30 +0000
Resent-Date: Thu, 11 Jul 2013 03:14:30 +0000
Resent-Message-Id: <>
Received: from ([]) by with esmtp (Exim 4.72) (envelope-from <>) id 1Ux7Ko-00081b-Ub for; Thu, 11 Jul 2013 03:14:22 +0000
Received: from ([]) by with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <>) id 1Ux7Kn-0007SY-VJ for; Thu, 11 Jul 2013 03:14:22 +0000
Received: by with SMTP id f4so10693480oah.35 for <>; Wed, 10 Jul 2013 20:13:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=c5Qy8rbr+SQ0WuHBIhrcqLNKy1qR9XNvRZ39LSdDz9Q=; b=LAAes30S2MISnK4vOaTohHiXGIT0sQftnf1hlYy8PsBPeMqYEbM1kt83tu5kCh1XI+ T1w3oW2bezD+us8XDjvcVARR0pCpsZlGxGP3TvBbAQasElcFkVwAWz+IZ96ThwAbZn/9 SbCAE3aCOh1Y70Kcnm9tAvz9XImUo+sbG84Xx0MQT4XdGzMXFbcP9EKm96UWmrmngWkS b31/EGXJZ/lLmkdARmutoGDgpGKa7FnyZ7iYFUJHUzTQzTX8J9hKPYCd2L7zGcysDNwX unjfWeKqGuDcDYlNqZsdRsl8g4K1GRVnrqwEHHTeFAkm+bkDCylQQBVcDCq9fLgU8XNN 5/JA==
MIME-Version: 1.0
X-Received: by with SMTP id r10mr30265309obg.63.1373512436059; Wed, 10 Jul 2013 20:13:56 -0700 (PDT)
Received: by with HTTP; Wed, 10 Jul 2013 20:13:56 -0700 (PDT)
In-Reply-To: <>
References: <> <>
Date: Wed, 10 Jul 2013 20:13:56 -0700
Message-ID: <>
From: Roberto Peon <>
To: Amos Jeffries <>
Cc: HTTP Working Group <>
Content-Type: multipart/alternative; boundary="089e01184b2ed8936604e133c819"
Received-SPF: pass client-ip=;;
X-W3C-Hub-Spam-Status: No, score=-3.5
X-W3C-Hub-Spam-Report: AWL=-2.689, 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: 1Ux7Kn-0007SY-VJ 2adb1289e1a3cbf5cfda08b16c3df98f
Subject: Re: HTTP router point-of-view concerns
Archived-At: <>
X-Mailing-List: <> archive/latest/18687
Precedence: list
List-Id: <>
List-Help: <>
List-Post: <>
List-Unsubscribe: <>

The intent was that one could negotiate a zero compression state, in which
case it ends up being similar to what is proposed here, I think, so long as
the appropriate key-value (or key) is in the static table.


On Wed, Jul 10, 2013 at 7:53 PM, Amos Jeffries <> wrote:

> On 11/07/2013 10:52 a.m., Christian Parpart wrote:
>> Hey guys,
>> I am just new to this list and I've just recently started working through
>> the HTTP/2 draft and all the blog articles found about.
>> That being said, I myself have also very concerns others have noticed as
>> well, and would like to deeply show my intention to help standing aside :)
>> I am the implementor of one of the many HTTP servers that's being used in
>> production, and one major feature is HTTP routing / load balancing,
>> and I would really love to implement an HTTP/1.1 successor that is (to
>> be) officially labeled HTTP/2[.0].
>> However, as a varnish [1] and a BSD [2] guy also raised there hands on,
>> is the lag of easy extraction of envelop information of an HTTP request
>> message, such as method, path, but most certainly the host.
>> Please forgive me if this is already on-topic somewhere hidden, however,
>> I would really highly encourage you to consider
>> adding some dedicated frame type for this kind of envelope information.
>> With that in mind, one might say that an HTTP/2 stream is not initiated
>> by a HEADERS frame but the ENVELOPE frame that contains the actual
>> uncompressed and unmystified but compact information about this request
>> message.
>> One humble proposal might indeed be:
>> type: (something unassigned)
>> flags: bit 1 = END_STREAM /* this HTTP message is complete with just
>> these envelope frame, e.g. a simple GET, and no need for user-agent etc. */
>> id: unique stream ID, semantics like any other stream ID
>> body: a key/value table of the envelope data
>> The envelope data table is a simple table of key/value pairs where the
>> key is an 8bit value identifying the entry
>> and a variable length value that is interpreted depending on the key. The
>> list of provided envelope fields ends
>> as the end of the envelope frame has been reached. that means, an
>> envelope must always fit into a single (first) frame.
>>   * :scheme => uint8: 0x01
>>       o http => uint8: 0x01
>>       o https => uint8: 0x02
>>       o custom => same as in method (if this is distinction is really
>>         demanded)
>>   * :method => uint8: 0x02
>>       o GET => uint8: 0x01
>>       o POST => uint8: 0x02
>>       o PUT => uint8: 0x03
>>       o DELETE => uint8:0x04
>>       o custom => uint8: 0xFF, followed by one uint8 encoding the size
>>         of the following bytes declaring the plaintext method value,
>>         e.g. "PROPFIND"
>>   * :path => uint8: 0x03, uint16 length in network byte order,
>>     followed by $length octects declaring the path's value.
>>   * :host => uint8: 0x04, uint16: length in network byte order,
>>     $length octets declaring the host's value.
>>   * :route => uint8: 0x05, uint8: length, $length octets that declare
>>     this value. (field is only specified if known, thus previousely
>>     announced by the remote server or this frame is part of a response
>>     and we are to announce a routing identifier)
>>   * :status => uint8: 0x06, uint16: code in network byte order  /* if
>>     HTTP/2 considers starting response streams the same way */
>> This is the exact information an HTTP client (scheme,method,path,host) or
>> server (status) MUST currently sent as part of the (first) HEADERS frame.
>> So the change I propose is, to extract this information from the HEADERS
>> frame and put it into its own frame that also initiates the stream
>> implicitly.
>> Having this in mind, it is a pleasure to implement HTTP routers because
>> those now don't have to decode the full HEADERS frames but just decode the
>> ENVELOPE frame and pass any continued frame to the directed next-hop server.
> Sadly the compression draft as written is completely incompatible with
> this type of load balancing. It operates a *stateful* compressor, such that
> every single HEADERS frame being received has to be decoded in order to
> re-encode using a separate connection-specific stateful compressor on the
> next-hop connections. This is mandatory for the compressed frames
> regardless of whether the ENVELOPE header is used to provide uncompressed
> details.
>  The best load balancers can do under the current compression draft is to
> avoid complex re-encoding by emiting only Literal header representations
> and skipping all the traffic optimizations compression offers. Which
> converts them into near perfect DDoS bandwidth-amplification sources.
> The sad state of affairs is that the *only* type of middleware which
> benefits from the proposed HTTP/2 is those which performs transparent
> interception and passive monitoring/recording of users traffic (ie the
> worst kind). Anything which starts modifying or manipulating (ie doing
> something useful for the ISP or CDN) MUST implement a full
> compressor/decompressor pair in order to keep the HTTP/2 statefulness in
> order.
> Amos