Re: FIN + RST behavior

Subodh Iyengar <subodh@fb.com> Fri, 24 March 2017 04:28 UTC

Return-Path: <prvs=42565afee1=subodh@fb.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3A0ED129431 for <quic@ietfa.amsl.com>; Thu, 23 Mar 2017 21:28:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.72
X-Spam-Level:
X-Spam-Status: No, score=-2.72 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=fb.com header.b=ctb8edxj; dkim=pass (1024-bit key) header.d=fb.onmicrosoft.com header.b=jwTL5hjf
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 6DUntFqdc3wP for <quic@ietfa.amsl.com>; Thu, 23 Mar 2017 21:28:37 -0700 (PDT)
Received: from mx0a-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 70E63129407 for <quic@ietf.org>; Thu, 23 Mar 2017 21:28:37 -0700 (PDT)
Received: from pps.filterd (m0001255.ppops.net [127.0.0.1]) by mx0b-00082601.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v2O4Qr7o005621; Thu, 23 Mar 2017 21:28:32 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : mime-version; s=facebook; bh=/GBa+LwewvfGzzIC8PoHmK7N9JBm0qO1Mzb3WBepdVA=; b=ctb8edxjSiXnqtKpadHeogztrFSJ0kFRHtO8Y7t2RUhjAo7YnXxW2RlBJY/9GRyvSka5 eB20U97dSL4xOypBXeeteQ5OFE5MmuUKLFFr4e+OvdC4yG5jVDR7Xg84jeZgBPsV3VNZ fx3j3vP1nMxv0zs6v7yju6/X5kU7MgvXsFM=
Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0b-00082601.pphosted.com with ESMTP id 29cgcstq0g-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 23 Mar 2017 21:28:32 -0700
Received: from NAM03-DM3-obe.outbound.protection.outlook.com (192.168.183.28) by o365-in.thefacebook.com (192.168.177.30) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 24 Mar 2017 00:28:30 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=/GBa+LwewvfGzzIC8PoHmK7N9JBm0qO1Mzb3WBepdVA=; b=jwTL5hjfMqsN1lvKqoe0TWuc4DnYcza+QltgUwWKm/QuPWbb+DSG836VCHYPfkzYYnlU4wUI0MpB0BViWwhRplBPlRcH6gftbvI5/t/GimogRnjm66OD6+NoJxkUGJVs0OE/1wQ84oYGpGITHslx11EFuH7KrlE+wvavdB8XFjA=
Received: from MWHPR15MB1455.namprd15.prod.outlook.com (10.173.234.145) by MWHPR15MB1456.namprd15.prod.outlook.com (10.173.234.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.977.11; Fri, 24 Mar 2017 04:28:29 +0000
Received: from MWHPR15MB1455.namprd15.prod.outlook.com ([10.173.234.145]) by MWHPR15MB1455.namprd15.prod.outlook.com ([10.173.234.145]) with mapi id 15.01.0977.021; Fri, 24 Mar 2017 04:28:29 +0000
From: Subodh Iyengar <subodh@fb.com>
To: "Lubashev, Igor" <ilubashe@akamai.com>, Martin Thomson <martin.thomson@gmail.com>
CC: "quic@ietf.org" <quic@ietf.org>
Subject: Re: FIN + RST behavior
Thread-Topic: FIN + RST behavior
Thread-Index: AQHSo1zPcZTZN/tlZkuJR+NHZURtjKGhltKAgAAu7CCAAH4YAIAAZDLNgAAXgICAAAogcw==
Date: Fri, 24 Mar 2017 04:28:29 +0000
Message-ID: <MWHPR15MB14556C117E35F0F38E366125B63F0@MWHPR15MB1455.namprd15.prod.outlook.com>
References: <MWHPR15MB1455B5E6D4F4FAC8411927E4B63C0@MWHPR15MB1455.namprd15.prod.outlook.com> <CABkgnnVRo_mT7sPO=xvmMdS-6wAJoSpARp+FG1R8i-RQWqE8Lg@mail.gmail.com> <MWHPR15MB145521D729498455F923679EB63F0@MWHPR15MB1455.namprd15.prod.outlook.com>, <CABkgnnVZCp8QBVPe81_9=JsrsAYLpy2KkWtfgY9pWcspoKBMSw@mail.gmail.com> <MWHPR15MB1455956FFF7AB6730C1E345CB63F0@MWHPR15MB1455.namprd15.prod.outlook.com>, <8dde9f5fac4440a8ac6c04e27efc042f@usma1ex-dag1mb5.msg.corp.akamai.com>
In-Reply-To: <8dde9f5fac4440a8ac6c04e27efc042f@usma1ex-dag1mb5.msg.corp.akamai.com>
Accept-Language: en-US
Content-Language: en-US
X-Mentions: ilubashe@akamai.com
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: akamai.com; dkim=none (message not signed) header.d=none;akamai.com; dmarc=none action=none header.from=fb.com;
x-originating-ip: [25.173.47.4]
x-microsoft-exchange-diagnostics: 1; MWHPR15MB1456; 7:au1q+JGTCax2Z0jMcrAOHfjsvDz/AFZI3hC28nU/L+8516JfCujhcG4ItvUPEDD+8cU/XQLjR/N1KVi8616CuOEfeH3VrNLAskYcCyViA/RG85iEvKwP8GhmWiypIGhUa/vEQfuU7e/pxCKohlfZC+/DscRvrhm08YkV2IIIJbXCLXd+cWqGTAx6MHbCA6gC3KqsCUudq5EyMuW6WS/V7wstIuQ5+VhzyduZeZZLmAj4nRCPj93MWqu7MCxBObuppjWaUxs9HfNv6fW8iFjw0heFYXNHLZprf5PeZKrnIMH4buh8tdvY2pDopQ6vXG/MyVyktm7PNV9rCX0rmn4zqw==; 20:vhFBtHiwmPdrI10ndqNZYeflfEM+aN/gv2uErkAgm1JGU0DO/OJPPoToXriFhEvjLSvudqEP7dvY3h7REyWwJBuEa9rcgagsYWtUlx4P8OiFzzXayrE9nWTLJeAbKLUMT8PWsxF20+OIezy4a75eDK5GkeplEDE+qKKVSm/xMIc=
x-ms-office365-filtering-correlation-id: 0c136176-9137-4cdf-4823-08d4726e38f0
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075); SRVR:MWHPR15MB1456;
x-microsoft-antispam-prvs: <MWHPR15MB1456A6FD502AB2BD786C14C7B63E0@MWHPR15MB1456.namprd15.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(158342451672863)(67672495146484)(21748063052155);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041248)(20161123558025)(20161123555025)(20161123562025)(20161123564025)(20161123560025)(6072148); SRVR:MWHPR15MB1456; BCL:0; PCL:0; RULEID:; SRVR:MWHPR15MB1456;
x-forefront-prvs: 0256C18696
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39450400003)(39410400002)(39830400002)(51444003)(377454003)(24454002)(3280700002)(53546009)(25786009)(93886004)(790700001)(102836003)(6116002)(2906002)(86362001)(8676002)(66066001)(7696004)(2950100002)(3660700001)(81166006)(5660300001)(3846002)(4326008)(6246003)(38730400002)(33656002)(236005)(6306002)(54896002)(55016002)(99286003)(9686003)(189998001)(229853002)(6506006)(77096006)(6436002)(2900100001)(74316002)(7736002)(54356999)(8936002)(76176999)(19627405001)(50986999)(39060400002)(122556002)(53936002)(561944003); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR15MB1456; H:MWHPR15MB1455.namprd15.prod.outlook.com; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en;
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_MWHPR15MB14556C117E35F0F38E366125B63F0MWHPR15MB1455namp_"
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Mar 2017 04:28:29.0640 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR15MB1456
X-OriginatorOrg: fb.com
X-Proofpoint-Spam-Reason: safe
X-FB-Internal: Safe
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-03-24_03:, , signatures=0
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/h1amShNr1Zl-Dk7gQ0V-ns00uvw>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 24 Mar 2017 04:28:40 -0000

@Lubashev, Igor<mailto:ilubashe@akamai.com>


<mailto:ilubashe@akamai.com>>Concurrency limit is about the amount of local resources a remote peer can consume.


Let's say that for every stream there is an initiator (who is subject to stream limit) and a peer.
Aren't the retransmission buffers which the peer has to hold onto until the initiator ACKs them also a part of the local resources here?


An initiator who doesn't ACK any bytes from the server forces a peer to keep state for it. However it could send it's own FIN which is ACKed normally.


My question generally here is that with the current state machine seems that it's difficult for both peers to get a consistent view of what each side thinks that the

open peer streams have. The peer should only release the retransmission buffers when it knows all of the data + FIN has been ACKed, and I think that's when it should release

the stream limit. However the initiator needs to know when this happens so it would need to keep track of the ACKs for the ACKs it sent. Unidirectional streams seem to make this simpler.

>To be put precisely, the concurrency limit can be defined as “the max number of streams with non-zero unACKed bytes sent by that peer”.

I'm not sure I understand your meaning here or maybe I'm confused by what you consider as the peer.
Can't the initiator just send a FIN and get an ACK for the FIN, however never ACK the peer's frames? In this case the initiator would have "zero UNACKed bytes" but the peer would not.


Subodh

________________________________
From: Lubashev, Igor <ilubashe@akamai.com>
Sent: Thursday, March 23, 2017 11:27:29 AM
To: Subodh Iyengar; Martin Thomson
Cc: quic@ietf.org
Subject: RE: FIN + RST behavior

Concurrency limit is about the amount of local resources a remote peer can consume.  It is not about how much local resources can be consumed by the local application – these limits can be enforced without any help from the protocol.

So concurrency limit is really the number of concurrent in-progress streams that a peer is willing to receive.  This maps well with unidirectional streams, but this is not a requirement.  To be put precisely, the concurrency limit can be defined as “the max number of streams with non-zero unACKed bytes sent by that peer”.  This means, peers can negotiate separate concurrency limits.


-          Igor

From: Subodh Iyengar [mailto:subodh@fb.com]
Sent: Thursday, March 23, 2017 1:09 PM
To: Martin Thomson <martin.thomson@gmail.com>
Cc: quic@ietf.org
Subject: Re: FIN + RST behavior


>  The client can consider its own resources to be available for use by
the server as soon as it receives the FIN and processes it.  If this
were a server resource, then you are right, it's not that simple
because the client can't assume that the server has released state
yet.

Ya in the case of the previous example, it is a server resource since it's a client initiated stream.
@Martin Thomson<mailto:martin.thomson@gmail.com> I'm starting to like your proposal of unidirectional streams more and more :)



Subodh



________________________________
From: QUIC <quic-bounces@ietf.org<mailto:quic-bounces@ietf.org>> on behalf of Martin Thomson <martin.thomson@gmail.com<mailto:martin.thomson@gmail.com>>
Sent: Thursday, March 23, 2017 4:04:46 AM
To: Subodh Iyengar
Cc: quic@ietf.org<mailto:quic@ietf.org>
Subject: Re: FIN + RST behavior

On 23 March 2017 at 15:10, Subodh Iyengar <subodh@fb.com<mailto:subodh@fb.com>> wrote:
> How does the client know when the server has released a slot in it's
> concurrency limit? The server can't immediately release this when it sends
> out the FIN because it still must keep state until it receives all the
> ACKs for the stream. I think the client need to keep track of the ACK of the
> ACKs of all the server sent bytes in the stream, which would be a bit sad.


The client can consider its own resources to be available for use by
the server as soon as it receives the FIN and processes it.  If this
were a server resource, then you are right, it's not that simple
because the client can't assume that the server has released state
yet.