"Too Many Requests" Response Code for the Constrained Application Protocol
RFC 8516

Document Type RFC - Proposed Standard (January 2019; No errata)
Last updated 2019-01-22
Replaces draft-keranen-core-too-many-reqs
Stream IETF
Formats plain text pdf html bibtex
Reviews
Stream WG state Submitted to IESG for Publication
Document shepherd Carsten Bormann
Shepherd write-up Show (last changed 2018-08-15)
IESG IESG state RFC 8516 (Proposed Standard)
Consensus Boilerplate Yes
Telechat date
Responsible AD Alexey Melnikov
Send notices to Carsten Bormann <cabo@tzi.org>
IANA IANA review state IANA OK - Actions Needed
IANA action state RFC-Ed-Ack
Internet Engineering Task Force (IETF)                        A. Keranen
Request for Comments: 8516                                      Ericsson
Category: Standards Track                                   January 2019
ISSN: 2070-1721

                 "Too Many Requests" Response Code for
                  the Constrained Application Protocol

Abstract

   A Constrained Application Protocol (CoAP) server can experience
   temporary overload because one or more clients are sending requests
   to the server at a higher rate than the server is capable or willing
   to handle.  This document defines a new CoAP response code for a
   server to indicate that a client should reduce the rate of requests.

Status of This Memo

   This is an Internet Standards Track document.

   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Further information on
   Internet Standards is available in Section 2 of RFC 7841.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   https://www.rfc-editor.org/info/rfc8516.

Copyright Notice

   Copyright (c) 2019 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (https://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Keranen                      Standards Track                    [Page 1]
RFC 8516       "Too Many Requests" Response Code for CoAP   January 2019

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   3
   3.  CoAP Server Behavior  . . . . . . . . . . . . . . . . . . . .   3
   4.  CoAP Client Behavior  . . . . . . . . . . . . . . . . . . . .   3
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .   4
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   4
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   5
     7.1.  Normative References  . . . . . . . . . . . . . . . . . .   5
     7.2.  Informative References  . . . . . . . . . . . . . . . . .   5
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .   6
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   6

1.  Introduction

   The Constrained Application Protocol (CoAP) [RFC7252] response codes
   are used by a CoAP server to indicate the result of an attempt to
   understand and satisfy a request sent by a client.

   CoAP response codes are similar to the HTTP [RFC7230] status codes,
   and many codes are shared with similar semantics by both CoAP and
   HTTP.  HTTP has the code "429" registered for "Too Many Requests"
   [RFC6585].  This document registers a CoAP response code "4.29" for
   similar purposes and uses the Max-Age option (see Section 5.10.5 of
   [RFC7252]) to indicate a back-off period after which a client can try
   the request again.

   While a server may not be able to respond to one kind of request, it
   may be able to respond to a request of a different kind, even from
   the same client.  Therefore, the back-off period applies only to
   similar requests.  For the purpose of this response code, a request
   is similar if it has the same method and Request-URI.  Also, if a
   client is sending a sequence of requests that are part of the same
   series (e.g., a set of measurements to be processed by the server),
   they can be considered similar even if request URIs are different.
   Because request similarity is context-dependent, it is up to the
   application logic to decide how the similarity of the requests should
   be evaluated.

   The 4.29 code is similar to the 5.03 "Service Unavailable" [RFC7252]
   code in that the 5.03 code can also be used by a server to signal an
   overload situation.  The 5.03 code also uses the Max-Age option to
   indicate the time after which a client can retry.  However, the 4.29
   code indicates that the too-frequent requests from the requesting
   client are the reason for the overload.

Keranen                      Standards Track                    [Page 2]
RFC 8516       "Too Many Requests" Response Code for CoAP   January 2019

2.  Terminology

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
Show full document text