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

Christer Holmberg <christer.holmberg@ericsson.com> Mon, 02 December 2019 15:58 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 6E202120882 for <core@ietfa.amsl.com>; Mon, 2 Dec 2019 07:58:09 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.001
X-Spam-Level:
X-Spam-Status: No, score=-2.001 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, URIBL_BLOCKED=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 4X3lXKYDr-OM for <core@ietfa.amsl.com>; Mon, 2 Dec 2019 07:58:06 -0800 (PST)
Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00047.outbound.protection.outlook.com [40.107.0.47]) (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 84CD112088C for <core@ietf.org>; Mon, 2 Dec 2019 07:58:06 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MQAd3/S02e5p3eJikO1G2zGYKWN0TgbmgOXj2/dl8DmUUnaHBmZEqrfhiln7v64tc501LRjLmGElQtw6yWInUVfOHQlfjHwXDD6h6RYI4XldsM5jtKROGYJ1IQKkiQIgIWd15boGWwlDHzbkn7h1CtyW0ME/QVWSzkR6A1smFG1KzL6ySa2uBZcOTwXv+JBde5zP9OLUg8MtRMxUjsTVBF+tYxYYdb0y2JN7YzibluclOZSkhrr27aysB45nWlrdP1Vmo1v4aizGevLfUqNRLnsVrGfmqe9CTuRjJRW/5+eKtWJpiTE+dipwLFub90s/z1QfPx9P0bKiT9ZrlS0lNQ==
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=hmGN1ZDVqPiKfFW9brj4wtnBO1mEybb8qMwLfDFNW3w=; b=Y2vOc3WzFg0QWZU8/Dvbte06ac4eZYiqmaTVefkqLb4yHlRgGsI72HYLoW8KtBS5A6LdfcVWeYqDDH5/O7y4j3GmusPNUtUXUZz5rqRhx2n6qeOkELZOqDJS8WZ7wT9lEgASpOuyPeDMMKEnvMcBkFAGgLyJ0RX+TcJ2kcR0RCjOBrY2jDGy8YK7Xxo+Gz/FkG1h0bMX1biKgqTyd0t31nLy0sK9Cn7w/63hPR15qdM6n9W4/q6P9PI0YCaatJvUrzvMHQm1EHiJCqgUZQ1g4enKxHtem6HipIvt4w2h765YT7NDHGGO2s2aRXpZS/e5zui3ZqGNrdH3U8nuV3ArtQ==
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=hmGN1ZDVqPiKfFW9brj4wtnBO1mEybb8qMwLfDFNW3w=; b=Fv4cJ7qQjLMvPQY1+LWaCE0ZEIsB6wDvLJkecLhAB8Gu1rfZj+4ugBoHUJSW0vKDlSMby9wJwXLxVXOLe3m+7B07E3SqIhVHK3FF1e4m/8aHeUvHodlZz8qFEhvde0vH4HAT188+7zARDjL+9WAHwJ4Dpr/TlJtipQf3qBr/YiI=
Received: from HE1PR07MB3161.eurprd07.prod.outlook.com (10.170.245.23) by HE1PR07MB3436.eurprd07.prod.outlook.com (10.170.242.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.6; Mon, 2 Dec 2019 15:58:04 +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 15:58:04 +0000
From: Christer Holmberg <christer.holmberg@ericsson.com>
To: "Kraus Achim (INST/ECS4)" <Achim.Kraus=40bosch-si.com@dmarc.ietf.org>
CC: "core@ietf.org" <core@ietf.org>, Carsten Bormann <cabo@tzi.org>
Thread-Topic: [core] Retransmission of non-confirmable response message upon receiving request message retranmission?
Thread-Index: AQHVppE/OetFI+DdS0KoPWGUqntDGKeiDkmAgAADTICABRVdgA==
Date: Mon, 02 Dec 2019 15:58:03 +0000
Message-ID: <96A29F25-2555-4542-875A-F1B8194CC254@ericsson.com>
References: <41889A1F-ACC3-458B-B57F-503A55D1D2A3@ericsson.com> <FB10E1B0-E52C-47F7-A0D9-87AE305E29F5@tzi.org> <09a7f0f318dc4f45a3cdd7791b28ecdd@bosch-si.com>
In-Reply-To: <09a7f0f318dc4f45a3cdd7791b28ecdd@bosch-si.com>
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: 262ed02f-e100-4df9-cd36-08d777406a4e
x-ms-traffictypediagnostic: HE1PR07MB3436:
x-microsoft-antispam-prvs: <HE1PR07MB34368A2B079323211F523B1E93430@HE1PR07MB3436.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 0239D46DB6
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(346002)(136003)(396003)(366004)(39860400002)(199004)(189003)(5660300002)(8676002)(58126008)(316002)(54906003)(446003)(99286004)(14444005)(6436002)(2906002)(15650500001)(66066001)(2616005)(11346002)(229853002)(256004)(6486002)(44832011)(36756003)(86362001)(8936002)(71200400001)(81156014)(478600001)(81166006)(33656002)(66574012)(966005)(71190400001)(305945005)(91956017)(7736002)(76176011)(66476007)(6246003)(64756008)(3846002)(76116006)(25786009)(66556008)(4326008)(66946007)(6116002)(102836004)(26005)(14454004)(53546011)(6506007)(6306002)(66446008)(6512007)(186003); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR07MB3436; 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: LKIP6Sf+kfcXc/+Fxci7Q2WGtVrZQL+h/uN8GVaAZpxrVaUwMMv0sAtQx17Q1bvoNTlsk4xredB1p1yfQGHUUYpaNRKlVI+z/QyAaXNOM36+3rxZo9dD4hfjTEZTTcc2yKHtrvz/gdtIj1kFu6CH4H9HkAnI2tpkEQ61itE46aIDh1EwaUMhpXFRMZVUuBY/RERKQ9h7Q3qr0RicK4YA3022ekKfFpIkChQ+PXWop6/jJ8hO4tgYZSbrQzoR7C0gDvggOqvrpaGQOuTV0mu16Ao7pSKlNYm+ahH1n+j3q+AnNwGlUxRpXmoCLX0bWjEhFO82hRAoK9YQMU9+hK24EPaPpbLfcBBqXWUzDeZbEHWeip6JMGn0LcMDGDMLyMjeMMZLZd5wmM0mdux13RNXa2ilndL1FH9V6yN0dFH3fkkomFNlt4Vv+gExrgivOCXa9tjC+SUEU+y63QEDFIW8Ke7zLuJeRc4qkZ8thwDBMtg=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-ID: <101DCC9A008EAB4ABB1A5800833F56D7@eurprd07.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 262ed02f-e100-4df9-cd36-08d777406a4e
X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Dec 2019 15:58:04.0146 (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: gZHJ9IVK+pJdyKf/7NxyZAPPVMtSEp27VgVJNE3odJlbY8hJuUmQd2TXfUZsdw1dxxbOEoVSHV5lBvl7gF1+ZAqObW4xRivHmhui1MjgcOY=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB3436
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/ctQaQvMy_ftkshA1qLLBPEvW6N8>
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 15:58:10 -0000

Hi Kraus,
    
>    Section 4 is about transmission (CON, NON,ACK and RST), and only slight refer to section 5 (request/response). For that FMPOV it seems to be clear, that 
>    if a retransmission is detected, the receiver should do its best the send back the same answer, in your case the empty ACK. 
>
>    In my interpretation of Section 4.5 the intention is, that the retransmission should be handled best on the transmission layer and should not be visible/forwarded
>    to the request/response layer. That maybe relaxed, if the outcome is the same or shows only acceptable difference. Generally, the messages (flight) of the original
>    answer are intended to be retransmitted.

How does the stack know if the outcome will be the same? 

And, what is the definition of "acceptable difference"?

>    Section 5 is then about the request/response 5.2.2, page 34 (top), "If a retransmitted request is received (perhaps because the original
>    Acknowledgement was delayed), another Empty Acknowledgement is sent, and any response MUST be sent as a separate response."
>    That seem to point to the same intention: retransmit the original messages (flight) as answer.
  
I am not sure what you mean by "original message as answer". Are you referring to an ACK, or to a response message?
    
>    Q1. "Perhaps I have missed it" => I think page 34 top specifies that.
  
Where?

I can only find text saying that another ACK is sent is a request retransmit is received.
   
>    Q2: That's the responsibility of the application to choose the right tradeoff between resources consumption and complying to the expectations.
>    If the difference is larger, your application must be designed for that. 
  
The issue is that the responses may not be identical, as the server does not keep track of previously sent responses.

Regards,

Christer


    
    -----Ursprüngliche Nachricht-----
    Von: core <core-bounces@ietf.org> Im Auftrag von Carsten Bormann
    Gesendet: Freitag, 29. November 2019 13:08
    An: Christer Holmberg <christer.holmberg=40ericsson.com@dmarc.ietf.org>
    Cc: core@ietf.org
    Betreff: Re: [core] Retransmission of non-confirmable response message upon receiving request message retranmission?
    
    Hi Christer,
    
    > On Nov 29, 2019, at 09:44, Christer Holmberg <christer.holmberg=40ericsson.com@dmarc.ietf.org> wrote:
    > 
    > Hi,
    >  
    > A couple of questions for clarification.
    >  
    >  
    > 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.
    
    
    > ---
    >  
    > 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.
    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.
    
    (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.)
    
    > 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.
     
    > 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.
     
    > 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.
     
    > 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”.
    
    Grüße, Carsten
    
    _______________________________________________
    core mailing list
    core@ietf.org
    https://www.ietf.org/mailman/listinfo/core