Re: [core] Retransmission of non-confirmable response message upon receiving request message retranmission?

Christer Holmberg <christer.holmberg@ericsson.com> Mon, 02 December 2019 09:16 UTC

Return-Path: <christer.holmberg@ericsson.com>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A0A58120048 for <core@ietfa.amsl.com>; Mon, 2 Dec 2019 01:16:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.002
X-Spam-Level:
X-Spam-Status: No, score=-2.002 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.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 SeqQu-3vru5N for <core@ietfa.amsl.com>; Mon, 2 Dec 2019 01:16:50 -0800 (PST)
Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10080.outbound.protection.outlook.com [40.107.1.80]) (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 C6DA3120044 for <core@ietf.org>; Mon, 2 Dec 2019 01:16:48 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YmZkX733CmkTkhdo2lrB02yzKY6VgOf8QtA8e2lNesikgXplC/o7BRxaEJhM/kPWfEAz9cTL/5DHgrHGbMpzN8dwJM2elvVS/ac4ZivPU2FoBf4s83Ph5lDl+X+UTUatuKSekLgS1bPIrNO4W1V1PL00q/2jY6v2hpHkTK6fMklJwnnsxUHGhoQDFb43QRoE7FPda1oXhcPOTb5fbxxfDUz5yXRw6wDUOkQEVjjaymPzg+39gdx5m+4O6dYAgAaKRV+BnCq0tBIrJNE95dcc/Cf1/vnfR26fozY2Wba3Qo5FLLY9PlQcJVWbTNYHCi/Wn/cl5PUh13jlRdYpQsSAuw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9Dg7uJjc8BVQwur7XNZNv2mLlN2yzdRCmlDYohdZWko=; b=Ivb0wS6GkHTg8aMc+vOc8MuBslLWKqbuln50NX3I34qR69f2SlZ9I3FubxPAOAghkNO+mS5Nb53rcQY603kHTjNqWQYB+rH07rntfonSaIfFuEbrc2AwufoMB2KmI5kH+9vWb5EnRI0TRgnYhWlnneMiLGRWLiLA48Hs+jQloB+v9bFzjLvVqSLFuiP5mBQvdbINznmlEMa5s8jRJHNyoMSmNMR1ZLgdl9lIaLekM9IH/EfRreZvq/CFw4tYXu6lX6nxzR+KMVg9rNJbJzd6lOX78JZhys6Affks+d3/pA3C7vIS2Lo2QzqjAtOqtliZo+3sn2qDGZ/7BFkM0KWeww==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9Dg7uJjc8BVQwur7XNZNv2mLlN2yzdRCmlDYohdZWko=; b=GpIm+ve81JtReum1LAb8gLxraNtTQbOXVV1x2CAHQnDTl3a46OE0j3dFu8Zga9kFFxUla9o2IW1Rwgg7STEXO0jhAa2PKsDqxpVo4PAO+SuJv3jHQpvCksot8IPtlBScBeolaC4HqBVMALafGmf87uhSHVDF5y8gcKM0OVk9xJI=
Received: from HE1PR07MB3161.eurprd07.prod.outlook.com (10.170.245.23) by HE1PR07MB3467.eurprd07.prod.outlook.com (10.170.241.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.4; Mon, 2 Dec 2019 09:16:37 +0000
Received: from HE1PR07MB3161.eurprd07.prod.outlook.com ([fe80::2ca9:414:cc01:9706]) by HE1PR07MB3161.eurprd07.prod.outlook.com ([fe80::2ca9:414:cc01:9706%4]) with mapi id 15.20.2516.003; Mon, 2 Dec 2019 09:16:37 +0000
From: Christer Holmberg <christer.holmberg@ericsson.com>
To: Carsten Bormann <cabo@tzi.org>
CC: "core@ietf.org" <core@ietf.org>
Thread-Topic: [core] Retransmission of non-confirmable response message upon receiving request message retranmission?
Thread-Index: AQHVppE/OetFI+DdS0KoPWGUqntDGKeiDkmAgASofwA=
Date: Mon, 02 Dec 2019 09:16:37 +0000
Message-ID: <15497B4D-33BA-4DE9-A352-417F6393E4D2@ericsson.com>
References: <41889A1F-ACC3-458B-B57F-503A55D1D2A3@ericsson.com> <FB10E1B0-E52C-47F7-A0D9-87AE305E29F5@tzi.org>
In-Reply-To: <FB10E1B0-E52C-47F7-A0D9-87AE305E29F5@tzi.org>
Accept-Language: en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/10.1e.0.191013
authentication-results: spf=none (sender IP is ) smtp.mailfrom=christer.holmberg@ericsson.com;
x-originating-ip: [89.166.49.243]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 0bc6e998-71fa-410e-8c28-08d7770855a0
x-ms-traffictypediagnostic: HE1PR07MB3467:
x-microsoft-antispam-prvs: <HE1PR07MB3467228252574F06EA96899093430@HE1PR07MB3467.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 0239D46DB6
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(376002)(366004)(346002)(39860400002)(136003)(199004)(189003)(3846002)(2906002)(76116006)(66556008)(66946007)(44832011)(305945005)(7736002)(66446008)(91956017)(58126008)(186003)(26005)(2616005)(86362001)(316002)(11346002)(446003)(64756008)(6916009)(66476007)(36756003)(102836004)(71190400001)(15650500001)(71200400001)(81166006)(81156014)(5660300002)(6506007)(14454004)(8936002)(76176011)(478600001)(256004)(66066001)(8676002)(99286004)(14444005)(25786009)(6436002)(4326008)(229853002)(6512007)(6486002)(33656002)(6116002)(6246003); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR07MB3467; H:HE1PR07MB3161.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: h4axwOU6UDl287BhAs5UIag8VQtf0RkzM9v3NVWJU18EqLTq5vI44vyL28TpNBicEhHzm2AsDaFm1iZnJs22H3WzIZaP/+e6SPLeFt3/HIrze0j4LzpLiqdAXhfZr2a7LYfeEw6G6s1MgnPSX47AQCt+QcVGAySRlDCwHvL0SIdAEqVg68Nch9XvG8Dv3UsHZENWJumiqZeeOfV7PS5MqaWOQu7pVd+EPDEZknUJskg3Y5DQ3mRyH6ylqN8xjqDjkOfr3iT9pJfF+NNiTZjW32BYH6ieiph87vu9HxCMbCUVKwedGCk68thxBZqLHdwJ9WpIDUCmI5RLM2WwkguI4EoLGhwxWiHuk2zJvjJvS7E9a3ljT/ILMgY0OKW9Yt65Uh9frxZapE1qJmgjzIJrvGzAsFAcBp4xNragNFaY9C222EXjkO2crdROEys2wfIX
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-ID: <BD57ABCF1B11734085C1DBE2E3C43FF9@eurprd07.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 0bc6e998-71fa-410e-8c28-08d7770855a0
X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Dec 2019 09:16:37.5403 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: izf+QyhjmioS3vH5/3TClmtbjw6N85CQmHXs9nicy+sU4MiV4PmaezMel/KYWTQy60eeHp2S5Fe8Hlk++YDX4R1wpr5glKDKdMQVgqHMVv8=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB3467
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/gk6xT1R-9nlEc6bh7VICs1ITKDU>
Subject: Re: [core] Retransmission of non-confirmable response message upon receiving request message retranmission?
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Dec 2019 09:16:52 -0000

Hi,

    >> Assume a CoAP server receives a confirmable request message.
    >>  
    >> According to Section 4.5. of RFC 7252, the server SHOULD retransmit the associated ACK whenever it receives a retransmission of the request message. So far, so good.
    >>  
    >> Then, assume that the sever sends a non-confirmable response message to the request. AFAIK, that is allowed.
    >
    > Allowed, yes, but also a rather unusual case: The client took care to send a confirmable request, and the server only answers unreliably.  
    > This combination makes the most sense for an observe-GET, where the server is sending periodic notifications, so the loss of a single one is not really a big problem.

    Whether it is a problem or not I guess depends on the use-case, but I assume one would use confirmable responses it is critical to receive each notification.

    Q1:
      
    >> Perhaps I have missed it, I can’t find any text saying that the server would retransmit the response message if it receives a retransmission of the request. 
    >
    > No, it won’t.  The client will retransmit only up to receiving an ACK.

    Correct, so in normal situations the server should not receive retransmits of the request once it sends the response. But, it could happen if a request retransmit has got "stucked" in the network somewhere.

    > Since your scenario assumes non-confirmable responses, this implies a separate response, so the ACK will be empty.  The server can then send, at leisure, 
    > its response; no further retranmissions will take place.

    I think it would be good if that is explicitly written in the RFC, because in many other protocols receiving a retransmit of a request *will* trigger a retransmit of the response.

    > (A weird case is where all ACKs get lost and finally the response indicates to the client that the request must have arrived, stopping retransmission — see penultimate
    > paragraph of 4.2.  Still, the message-id of all retransmissions is the same, so no additional response will be generated.)

    If the ACK does get lost, and the client receives the response, will it stop retransmitting the request?

    >> Section 4.3 does say that a server may choose to transmit multiple copies of a non-confirmable message, but there is no text saying that
    >> such transmits would be triggered by a retransmission of the request.
    >
    > That is indeed not intended.  Retransmissions happen at the message layer.  Request/response is a layer above and is not concerned with retransmissions.

    Detecting of a request retransmit also happens at the message layer.

    >> Section 4.5. does say:
    >>  
    >>      “A server might relax the requirement to answer all retransmissions
    >>       of an idempotent request with the same response (Section 4.2),”
    >
    > Now you are back to piggybacked responses.

    That is not mentioned anywhere.

    And, now I am also back at another issue I had: sending retransmits that are not identical, having no clue whether the remote peer is going to detect it...
     
    >> Where does Section 4.2 talk about answering retransmissions of an idempotent request (or any request, for that matter) with the same response?
    >
    >Good question.  Interesting.
     
     ---
      
    Q2:
      
    >> Related to Q1, Section 4.5 says:
    >>  
    >>       ”For example, an implementation might want to process duplicate
    >>       transmissions of a GET, PUT, or DELETE request as separate
    >>       requests if the effort incurred by duplicate processing is less
    >>       expensive than keeping track of previous responses would be.”
    >>  
    >>  
    >> Maybe I misunderstand this “process as separate requests” thing, but:
    >>  
    >> First, it means that each response could be different from the previous one, and the sender of the request would have to process each of them.
    >
    > The sender is not supposed to retransmit a request if it already received a response.
    > Of course, the retransmission and the response might cross; in this case the superfluous response is not used.

But, if I understand correctly, in this case the server does not know whether a request is a retransmit or not.
     
    >> Second, does this mean that, if the responses are confirmable, the server should expect an ACK for each response? “Process as separate requests” makes it sound like that.
    >
    >If the response is sent as a confirmable message, the server expects an ACK for it.  It retransmits until it gets one.
    >If the response is in an ACK, it is not confirmable; this is really the useful case for “process as separate requests”.

I am referring to the server. If the server processes each retransmit as a separate request, in theory it might mean that each ACK will be different (since the server does not keep track of the ACK triggered by the previous request retransmit).

Regards,

Christer