RE: FIN + RST behavior

"Lubashev, Igor" <ilubashe@akamai.com> Fri, 24 March 2017 12:56 UTC

Return-Path: <ilubashe@akamai.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 139EC129444 for <quic@ietfa.amsl.com>; Fri, 24 Mar 2017 05:56:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 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, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=akamai.com
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 nGSNwkbl_j2Y for <quic@ietfa.amsl.com>; Fri, 24 Mar 2017 05:56:49 -0700 (PDT)
Received: from mx0b-00190b01.pphosted.com (mx0b-00190b01.pphosted.com [IPv6:2620:100:9005:57f::1]) (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 662AC1296CA for <quic@ietf.org>; Fri, 24 Mar 2017 05:56:49 -0700 (PDT)
Received: from pps.filterd (m0050102.ppops.net [127.0.0.1]) by m0050102.ppops.net-00190b01. (8.16.0.20/8.16.0.20) with SMTP id v2OCqUYP007976; Fri, 24 Mar 2017 12:56:44 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akamai.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : mime-version; s=jan2016.eng; bh=S3z8SHR2X0x4ulPUI4HfquRL9ypZnTvAnKi9eWkFJto=; b=cxic/zFaBile8dFgyRBru5uM2ciQ4x6q3gvW5ieKxzJWhyLMDE567PL2CDd5CKcurrbu CSYciF34La1WI039wlvqII3aVqJo+XiFTykOZShkLVyPCmkl0efLB9RgjR6aL2I4RKfd 4xR0FXqECpYNAWFCpbym6pWsm33IMecs2cl5h8jT4hYTqlr17Bg9EgzFcRDfs+9yPLX/ O8Wo3kZIpY2fPCiTIq+imIMru8dZ+EJW9JpuulS2+7rZFdZXBguodmXCzLFA4ZEMtKEv 8FR6zBfddWIQ0NhVwBDAI1dHWfq293dVkkJBTlW78EXkSqGaNWKDflXxRTdqOd3oqJcL LA==
Received: from prod-mail-ppoint1 (a184-51-33-18.deploy.static.akamaitechnologies.com [184.51.33.18] (may be forged)) by m0050102.ppops.net-00190b01. with ESMTP id 29cnfmup3m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 Mar 2017 12:56:43 +0000
Received: from pps.filterd (prod-mail-ppoint1.akamai.com [127.0.0.1]) by prod-mail-ppoint1.akamai.com (8.16.0.17/8.16.0.17) with SMTP id v2OCp8QP020973; Fri, 24 Mar 2017 08:56:43 -0400
Received: from email.msg.corp.akamai.com ([172.27.123.30]) by prod-mail-ppoint1.akamai.com with ESMTP id 29b9ww8xnc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 24 Mar 2017 08:56:43 -0400
Received: from USMA1EX-DAG1MB5.msg.corp.akamai.com (172.27.123.105) by usma1ex-dag1mb6.msg.corp.akamai.com (172.27.123.65) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Fri, 24 Mar 2017 05:56:42 -0700
Received: from USMA1EX-DAG1MB5.msg.corp.akamai.com ([172.27.123.105]) by usma1ex-dag1mb5.msg.corp.akamai.com ([172.27.123.105]) with mapi id 15.00.1178.000; Fri, 24 Mar 2017 08:56:42 -0400
From: "Lubashev, Igor" <ilubashe@akamai.com>
To: "martin.thomson@gmail.com" <martin.thomson@gmail.com>, "subodh@fb.com" <subodh@fb.com>
CC: "quic@ietf.org" <quic@ietf.org>
Subject: RE: FIN + RST behavior
Thread-Topic: FIN + RST behavior
Thread-Index: AQHSo1zPcZTZN/tlZkuJR+NHZURtjKGh2eCAgAA5O4CAAHPJAIAAZdGA///G0xCAAPb5gIAASu9p
Date: Fri, 24 Mar 2017 12:56:41 +0000
Message-ID: <250e9b58e5294fca8e5a7e7a4c3643c8@usma1ex-dag1mb5.msg.corp.akamai.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>, <MWHPR15MB14556C117E35F0F38E366125B63F0@MWHPR15MB1455.namprd15.prod.outlook.com>
In-Reply-To: <MWHPR15MB14556C117E35F0F38E366125B63F0@MWHPR15MB1455.namprd15.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
Content-Type: multipart/alternative; boundary="_000_250e9b58e5294fca8e5a7e7a4c3643c8usma1exdag1mb5msgcorpak_"
MIME-Version: 1.0
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-03-24_11:, , signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703240112
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-03-24_11:, , signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703240112
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/oUDsB0PU7oRhhHTPlpjdjN_F4xI>
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 12:56:52 -0000

I am not thinking about it from the perspective of the initiator of a stream. I am really thinking about a stream having two independent directions. It is the sender of the bytes (on a stream initiated by him or by the peer, does not matter) that must count the stream toward his concurrency limit while there are any unacked sent bytes. (By peer, I mean "an endpoint".)

The management of retransmit buffers is a local concern of the sender. If the buffers grow too large, the local app would not get a chance to write more into them. We are only protecting reassembly buffers here. If we also want to protect a table containing state for active streams, we would need to modify the definition for concurrent streams to "number of streams that this endpoint has sent any data on and still have unacked data or fin, or unacked rst".

- Igor

-----Original Message-----
From: Subodh Iyengar [subodh@fb.com]
Received: Friday, 24 Mar 2017, 12:28AM
To: Lubashev, Igor [ilubashe@akamai.com]; Martin Thomson [martin.thomson@gmail.com]
CC: quic@ietf.org [quic@ietf.org]
Subject: Re: FIN + RST behavior


@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.