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

Carsten Bormann <cabo@tzi.org> Fri, 29 November 2019 12:08 UTC

Return-Path: <cabo@tzi.org>
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 B52231201DE for <core@ietfa.amsl.com>; Fri, 29 Nov 2019 04:08:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.2
X-Spam-Level:
X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 pjdV8iNs8_4z for <core@ietfa.amsl.com>; Fri, 29 Nov 2019 04:08:32 -0800 (PST)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 32941120128 for <core@ietf.org>; Fri, 29 Nov 2019 04:08:32 -0800 (PST)
Received: from client-0103.vpn.uni-bremen.de (client-0103.vpn.uni-bremen.de [134.102.107.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 47PYFB3Xt7z10vj; Fri, 29 Nov 2019 13:08:30 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <41889A1F-ACC3-458B-B57F-503A55D1D2A3@ericsson.com>
Date: Fri, 29 Nov 2019 13:08:29 +0100
Cc: "core@ietf.org" <core@ietf.org>
X-Mao-Original-Outgoing-Id: 596722107.936994-ca259feb909c75aabdb5b6304134f75b
Content-Transfer-Encoding: quoted-printable
Message-Id: <FB10E1B0-E52C-47F7-A0D9-87AE305E29F5@tzi.org>
References: <41889A1F-ACC3-458B-B57F-503A55D1D2A3@ericsson.com>
To: Christer Holmberg <christer.holmberg=40ericsson.com@dmarc.ietf.org>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/sFcSKGWedMB3kuSSdHJcdijGY7o>
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: Fri, 29 Nov 2019 12:08:35 -0000

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