Re: Pipeline hinting revisited

Amos Jeffries <squid3@treenet.co.nz> Fri, 12 August 2011 06:21 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 1A3A321F8785 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 11 Aug 2011 23:21:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.53
X-Spam-Level:
X-Spam-Status: No, score=-10.53 tagged_above=-999 required=5 tests=[AWL=0.069, BAYES_00=-2.599, 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 KDl8qhsOx-3l for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 11 Aug 2011 23:21:29 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 41E1021F8509 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 11 Aug 2011 23:21:29 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.69) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1Qrl7B-0005K5-VR for ietf-http-wg-dist@listhub.w3.org; Fri, 12 Aug 2011 06:21:06 +0000
Received: from aji.keio.w3.org ([133.27.228.206]) by frink.w3.org with esmtp (Exim 4.69) (envelope-from <squid3@treenet.co.nz>) id 1Qrl70-0005Gf-Hw for ietf-http-wg@listhub.w3.org; Fri, 12 Aug 2011 06:20:54 +0000
Received: from [2002:3a1c:99e9:0:206:5bff:fe7c:b8a] (helo=treenet.co.nz) by aji.keio.w3.org with esmtp (Exim 4.72) (envelope-from <squid3@treenet.co.nz>) id 1Qrl6v-0003RU-RY for ietf-http-wg@w3.org; Fri, 12 Aug 2011 06:20:53 +0000
Received: from troja.treenetnz.com (unknown [119.224.36.238]) by treenet.co.nz (Postfix) with ESMTP id 4DC5CE6F48 for <ietf-http-wg@w3.org>; Fri, 12 Aug 2011 18:20:15 +1200 (NZST)
Message-ID: <4E44C61D.9030704@treenet.co.nz>
Date: Fri, 12 Aug 2011 18:20:13 +1200
From: Amos Jeffries <squid3@treenet.co.nz>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11
MIME-Version: 1.0
To: ietf-http-wg@w3.org
References: <CAAbTgTu2px+o=mFyEOuSW8KzHR-o5GeN9b6X-Q+VuRtQP=A0Qw@mail.gmail.com> <20110812053137.GC9902@1wt.eu> <CAP0-QpukAzexjJaMOHoTaAGRPYV_7-91Fr9P_ukkqNQ1gsDC_A@mail.gmail.com> <20110812055327.GE9902@1wt.eu>
In-Reply-To: <20110812055327.GE9902@1wt.eu>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Received-SPF: permerror client-ip=2002:3a1c:99e9:0:206:5bff:fe7c:b8a; envelope-from=squid3@treenet.co.nz; helo=treenet.co.nz
X-W3C-Hub-Spam-Status: No, score=-1.1
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, RDNS_NONE=0.793, TO_NO_BRKTS_NORDNS=0.001
X-W3C-Scan-Sig: aji.keio.w3.org 1Qrl6v-0003RU-RY e97c7644d9ce7773b6de749858ea5cf1
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Pipeline hinting revisited
Archived-At: <http://www.w3.org/mid/4E44C61D.9030704@treenet.co.nz>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/11192
X-Loop: ietf-http-wg@w3.org
Sender: ietf-http-wg-request@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: <E1Qrl7B-0005K5-VR@frink.w3.org>
Resent-Date: Fri, 12 Aug 2011 06:21:05 +0000

On 12/08/11 17:53, Willy Tarreau wrote:
> On Thu, Aug 11, 2011 at 10:43:36PM -0700, Darin Fisher wrote:
>> On Thu, Aug 11, 2011 at 10:31 PM, Willy Tarreau<w@1wt.eu>  wrote:
>>
>>> Hi Brian,
>>>
>>> On Thu, Aug 11, 2011 at 03:12:31PM -0700, Brian Pane wrote:
>>>> I've been thinking some more about request pipelining recently,
>>>> triggered by several observations:
>>>>
>>>> - A significant number of real-world websites could be made faster via
>>>> widespread adoption of request pipelining (based on my study of
>>>> ~15,000 sites in the httparchive.org corpus).
>>>> - A nontrivial fraction of mobile browsers are using pipelining
>>>> already, albeit not as aggressively as they could (based on Blaze's
>>>> study: http://www.blaze.io/mobile/http-pipelining-big-in-mobile/ )
>>>> - Client implementations that currently pipeline their requests are
>>>> using heuristics of varying complexity to try to decide when
>>>> pipelining is safe.  The list of conditions documented here is at the
>>>> complex end of the spectrum, and it's perhaps still incomplete:
>>>> https://bugzilla.mozilla.org/show_bug.cgi?id=599164
>>>>
>>>> The key question, I think, is whether heuristics implemented on the
>>>> client side will end up being sufficient to detect safe opportunities
>>>> for pipelining.  If not, a server-driven hinting mechanism of the sort
>>>> proposed in Mark's "making pipelining usable" draft (
>>>> http://tools.ietf.org/html/draft-nottingham-http-pipeline-01 ) seems
>>>> necessary.
>>>>
>>>> Anybody have additional experimental data on pipelining (including the
>>>> effectiveness of heuristics for turning pipelining on or off) that
>>>> they can share?
>>>
>>> We've been conducting some tests for a customer working with mobile
>>> terminals. I was very frustrated to see that pipelining did not bring
>>> any gain there due to the first non-pipelined request to each host.
>>> What happens is that there are many objects on a page, spread over
>>> many hosts. The terminal opens many parallel connections to these
>>> hosts, and as a result, there are 4-5 objects max to fetch over each
>>> connection. All connection have a first object fetched alone, and only
>>> once a response is received, a batch of 4 requests is sent. It is this
>>> pause between the first and the next request over a connection which
>>> voids the gain. It was always faster to open more parallel connection,
>>> despite the extra bandwidth, than to use pipeline, precisely due to
>>> this point.
>>>
>>> This is why I think we need to find a solution so that pipelining could
>>> be more aggressive on riskless requests, and possibly use the server
>>> side's hinting to safely fall back to non-pipelining ASAP if needed.
>>> I'm well aware that the biggest issue seems to be with broken servers
>>> getting stuck between requests. I don't know if there are many of those
>>> or not, but maybe at one point it will become those site's problem and
>>> not the browsers'.
>>>
>>
>> Often it is a bad intermediary (transparent proxy).  The origin server may
>> be just as helpless as the client :-(
>
> I agree, and my point is that it's the first intermediary between the
> client and the origin server that counts for the client, and most often
> this intermediary will support pipelining and it's too bad not to use
> it with the whole world. Anyway in both cases (good or bad intermediary),
> both the server and the client will have little clue and be of little
> help. Ideally we should have request numbers for the connection, but as
> Mark pointed it out a few months ago, those might be cached and make the
> issue worse. That said, are we sure they might be cached even if advertised
> in the Connection header ? I don't really think so. If we had intermediaries
> or server respond with "Connection: pipeline; req=#num", or even
> "Connection: req=#num", it should make it clear where it's explicitly
> supported, without waiting for the whole world to adopt it on every
> server. The advantage with Connection is that intermediaries will get
> rid of it.

I was just thinking the 100-continue infrastructure built up over the 
last few years with some success could be leveraged here. "Expect: 
pipeline" and a 1xx status to indicate explicit support.

That appears to nicely solve the case where pipelining is default-off 
and enabled whenever possible.

  It will not solve the problem of agents being aggressive in the 
pipeline before seeing such a 1XX status. The 430 status proposed by 
Mark resolves that case and can be emitted under the same requirements 
as 417.

IMO we should add "Expect: pipeline", 1XX and 430. 
http://tools.ietf.org/html/draft-nottingham-http-pipeline-01 looks like 
the right vehicle to extend and see that implemented.


AYJ