HTTP/2 and TCP CWND

Jitu Padhye <padhye@microsoft.com> Mon, 01 April 2013 17:52 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 39EED21E809D for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 1 Apr 2013 10:52:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.599
X-Spam-Level:
X-Spam-Status: No, score=-10.599 tagged_above=-999 required=5 tests=[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 TfLjj3GuMu57 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 1 Apr 2013 10:52:49 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 7F04D11E80AE for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 1 Apr 2013 10:52:49 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UMitG-0000xt-K8 for ietf-http-wg-dist@listhub.w3.org; Mon, 01 Apr 2013 17:51:30 +0000
Resent-Date: Mon, 01 Apr 2013 17:51:30 +0000
Resent-Message-Id: <E1UMitG-0000xt-K8@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <padhye@microsoft.com>) id 1UMitB-0000w7-0G for ietf-http-wg@listhub.w3.org; Mon, 01 Apr 2013 17:51:25 +0000
Received: from mail-by2lp0244.outbound.protection.outlook.com ([207.46.163.244] helo=na01-by2-obe.outbound.protection.outlook.com) by lisa.w3.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from <padhye@microsoft.com>) id 1UMitA-0003YA-3t for ietf-http-wg@w3.org; Mon, 01 Apr 2013 17:51:24 +0000
Received: from BY2FFO11FD016.protection.gbl (10.1.15.200) by BY2FFO11HUB033.protection.gbl (10.1.14.117) with Microsoft SMTP Server (TLS) id 15.0.651.3; Mon, 1 Apr 2013 17:50:53 +0000
Received: from TK5EX14HUBC102.redmond.corp.microsoft.com (131.107.125.37) by BY2FFO11FD016.mail.protection.outlook.com (10.1.14.148) with Microsoft SMTP Server (TLS) id 15.0.664.0 via Frontend Transport; Mon, 1 Apr 2013 17:50:53 +0000
Received: from va3outboundpool.messaging.microsoft.com (157.54.51.113) by mail.microsoft.com (157.54.7.154) with Microsoft SMTP Server (TLS) id 14.2.318.3; Mon, 1 Apr 2013 17:50:55 +0000
Received: from mail209-va3-R.bigfish.com (10.7.14.246) by VA3EHSOBE007.bigfish.com (10.7.40.11) with Microsoft SMTP Server id 14.1.225.23; Mon, 1 Apr 2013 17:50:54 +0000
Received: from mail209-va3 (localhost [127.0.0.1]) by mail209-va3-R.bigfish.com (Postfix) with ESMTP id 95A91640296 for <ietf-http-wg@w3.org.FOPE.CONNECTOR.OVERRIDE>; Mon, 1 Apr 2013 17:50:53 +0000 (UTC)
X-Forefront-Antispam-Report-Untrusted: CIP:157.56.240.21; KIP:(null); UIP:(null); (null); H:BL2PRD0310HT004.namprd03.prod.outlook.com; R:internal; EFV:INT
X-SpamScore: -16
X-BigFish: PS-16(zzdb82hzz1f42h1fc6h1ee6h1de0h1202h1e76h1d1ah1d2ahzz1033IL17326ah8275dh8275bhz31h2a8h668h839h947hd24hf0ah1288h12a5h12a9h12bdh137ah13b6h1441h1504h1537h153bh162dh1631h1758h18e1h1946h19b5h1ad9h1b0ah17ej9a9j1155h)
Received-SPF: softfail (mail209-va3: transitioning domain of microsoft.com does not designate 157.56.240.21 as permitted sender) client-ip=157.56.240.21; envelope-from=padhye@microsoft.com; helo=BL2PRD0310HT004.namprd03.prod.outlook.com ; .outlook.com ;
X-Forefront-Antispam-Report-Untrusted: SFV:SKI; SFS:; DIR:OUT; SFP:; SCL:-1; SRVR:BY2PR03MB609; H:BN1PR03MB006.namprd03.prod.outlook.com; LANG:en;
Received: from mail209-va3 (localhost.localdomain [127.0.0.1]) by mail209-va3 (MessageSwitch) id 1364838615577735_9517; Mon, 1 Apr 2013 17:50:15 +0000 (UTC)
Received: from VA3EHSMHS028.bigfish.com (unknown [10.7.14.252]) by mail209-va3.bigfish.com (Postfix) with ESMTP id 89C07C80258 for <ietf-http-wg@w3.org>; Mon, 1 Apr 2013 17:50:15 +0000 (UTC)
Received: from BL2PRD0310HT004.namprd03.prod.outlook.com (157.56.240.21) by VA3EHSMHS028.bigfish.com (10.7.99.38) with Microsoft SMTP Server (TLS) id 14.1.225.23; Mon, 1 Apr 2013 17:50:12 +0000
Received: from BY2PR03MB609.namprd03.prod.outlook.com (10.255.93.40) by BL2PRD0310HT004.namprd03.prod.outlook.com (10.255.97.39) with Microsoft SMTP Server (TLS) id 14.16.287.3; Mon, 1 Apr 2013 17:50:11 +0000
Received: from BN1PR03MB006.namprd03.prod.outlook.com (10.255.224.36) by BY2PR03MB609.namprd03.prod.outlook.com (10.255.93.40) with Microsoft SMTP Server (TLS) id 15.0.651.13; Mon, 1 Apr 2013 17:50:08 +0000
Received: from BN1PR03MB006.namprd03.prod.outlook.com ([169.254.6.114]) by BN1PR03MB006.namprd03.prod.outlook.com ([169.254.6.237]) with mapi id 15.00.0651.000; Mon, 1 Apr 2013 17:50:01 +0000
From: Jitu Padhye <padhye@microsoft.com>
To: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
CC: "Brian Raymor (MS OPEN TECH)" <Brian.Raymor@microsoft.com>, Rob Trace <Rob.Trace@microsoft.com>, Dave Thaler <dthaler@microsoft.com>, Martin Thomson <martin.thomson@skype.net>, Gabriel Montenegro <Gabriel.Montenegro@microsoft.com>
Thread-Topic: HTTP/2 and TCP CWND
Thread-Index: Ac4u/JrxD8HEzB3rR8CdUf/Gdhfe2w==
Date: Mon, 01 Apr 2013 17:50:00 +0000
Message-ID: <8e7e9a7db6204492afde5d8883570579@BN1PR03MB006.namprd03.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [2001:4898:d8:1000:74ac:1744:413c:c8cd]
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OrganizationHeadersPreserved: BY2PR03MB609.namprd03.prod.outlook.com
X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn%
X-FOPE-CONNECTOR: Id%59$Dn%W3.ORG$RO%2$TLS%6$FQDN%corpf5vips-237160.customer.frontbridge.com$TlsDn%
X-CrossPremisesHeadersPromoted: TK5EX14HUBC102.redmond.corp.microsoft.com
X-CrossPremisesHeadersFiltered: TK5EX14HUBC102.redmond.corp.microsoft.com
X-Forefront-Antispam-Report: CIP:131.107.125.37; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(189002)(199002)(79102001)(47446002)(56816002)(5343655001)(20776003)(46102001)(47976001)(50986001)(47736001)(5343635001)(33646001)(31966008)(59766001)(51856001)(69226001)(76482001)(53806001)(4396001)(65816001)(74502001)(44976002)(77982001)(80022001)(56776001)(47776003)(561944001)(50466001)(49866001)(81342001)(15202345001)(54316002)(23756002)(6806001)(16676001)(54356001)(63696002)(74662001)(24736002)(3826001); DIR:OUT; SFP:; SCL:1; SRVR:BY2FFO11HUB033; H:TK5EX14HUBC102.redmond.corp.microsoft.com; RD:InfoDomainNonexistent; MX:1; A:1; LANG:en;
X-OriginatorOrg: microsoft.onmicrosoft.com
X-Forefront-PRVS: 0803A0241F
Received-SPF: pass client-ip=207.46.163.244; envelope-from=padhye@microsoft.com; helo=na01-by2-obe.outbound.protection.outlook.com
X-W3C-Hub-Spam-Status: No, score=-0.0
X-W3C-Hub-Spam-Report: RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001
X-W3C-Scan-Sig: lisa.w3.org 1UMitA-0003YA-3t 6f107a90b12805d81cac5f0dd1b7ff12
X-Original-To: ietf-http-wg@w3.org
Subject: HTTP/2 and TCP CWND
Archived-At: <http://www.w3.org/mid/8e7e9a7db6204492afde5d8883570579@BN1PR03MB006.namprd03.prod.outlook.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/17189
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>

In the original SPDY draft (and the current HTTP2-01 draft), there is a TCP CWND setting exposed:

         5 - SETTINGS_CURRENT_CWND allows the sender to inform the
         remote endpoint of the current TCP CWND value.

It is not clear what the client is supposed to do with this information. There was a follow up post from Mile Belshe (https://groups.google.com/forum/?fromgroups#!topic/spdy-dev/XRkL7FlIOW4) in which he indicated that the client could persist the CWND stored by the server, and the server could later user it to "warm start" connections to the same client. This can potentially cut transfer time by several RTTs. 

I have several concerns about warm start, and if that is the only use for SETTINGS_CURRENT_CWND, then maybe we should not have the setting at all. 
 
First, if a cwnd value is persisted at the client, then, after the connection ends, it needs to be gradually decayed with time, and completely discarded if the client changes networks (e.g. from wifi to 3G etc.). This adds additional complexity to client implementation.  

Second, the server has to take any value reported by client with a large grain of salt, since it cannot trust the client to correctly decay/discard window. The client may even inflate the window in an attempt to get "better" service. So, at the very least, the server needs to check timeliness, which means it has to maintain additional state (e.g. remember when it last sent CWND to this client). This complicates server implementation.  

Third, The clients who implement this may be able to grab a higher share of bandwidth, which is unfair to legacy clients (e.g. normal HTTP clients). 

If the server wants to start with a higher initial cwnd, then that's already being discussed: http://tools.ietf.org/html/draft-ietf-tcpm-initcwnd-08.  I am not advocating for that proposal, but at least it is better than warm start, since there is no state to maintain and clients have no influence.

In general,  SETTINGS_CURRENT_CWND violates the basic layering principle. So, unless there is a really good reason to keep it, it should be removed.

Jitu