Skip to main content

Too Many Requests Response Code for the Constrained Application Protocol
draft-keranen-core-too-many-reqs-00

The information below is for an old version of the document.
Document Type
This is an older version of an Internet-Draft whose latest revision state is "Replaced".
Author Ari Keränen
Last updated 2018-03-05
Replaced by draft-ietf-core-too-many-reqs, RFC 8516
RFC stream (None)
Formats
Additional resources
Stream Stream state (No stream defined)
Consensus boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date (None)
Responsible AD (None)
Send notices to (None)
draft-keranen-core-too-many-reqs-00
Network Working Group                                         A. Keranen
Internet-Draft                                                  Ericsson
Intended status: Standards Track                           March 5, 2018
Expires: September 6, 2018

Too Many Requests Response Code for the Constrained Application Protocol
                  draft-keranen-core-too-many-reqs-00

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 Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on September 6, 2018.

Copyright Notice

   Copyright (c) 2018 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
   (http://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                 Expires September 6, 2018               [Page 1]
Internet-Draft  Too Many Requests Response Code for CoAP      March 2018

Table of Contents

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

1.  Introduction

   The Constrained Application Protocol (CoAP) [RFC7252] Response Codes
   are used by a CoAP server to indicate the result of the 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 purpose and also defines use of the Max-Age option to
   indicate when a client can try the request again.

   The 4.29 code is similar to the 5.03 "Service Unavailable" [RFC7252]
   code in a way that the 5.03 code can also be used by a server to
   signal an overload situation.  However the 4.29 code indicates that
   the too frequent requests from the requesting client are the reason
   for the overload.

2.  Terminology

   The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL NOT',
   'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and 'OPTIONAL' in this
   specification are to be interpreted as described in [RFC2119].

   Readers should also be familiar with the terms and concepts discussed
   in [RFC7252].

3.  CoAP Server Behavior

   If a CoAP server is unable to serve a client that is sending CoAP
   request messages more often than the server is capable or willing to
   handle, the server SHOULD respond to the request(s) with the Response
   Code 4.29, "Too Many Requests".  The server MAY include in the

Keranen                 Expires September 6, 2018               [Page 2]
Internet-Draft  Too Many Requests Response Code for CoAP      March 2018

   response a Max-Age option indicating the number of seconds after
   which the server assumes it is OK for the client to retry the
   request.

   TBD: If a server chooses to (not)accept a request based on the
   method/resource, how should this be indicated in the reply?

4.  CoAP Client Behavior

   If a client receives the 4.29 Response Code from a CoAP server to a
   request, it SHOULD NOT send the same request to the server before the
   time indicated in the Max-Age option has passed.  If the response
   does not contain Max-Age option, the client SHOULD wait for the Max-
   Age default value, 60 seconds.

   A client MUST NOT rely on a server being able to send the 4.29
   Response Code in an overload situation because an overloaded server
   may not be able to reply to all requests at all.

   TBD: what kind of requests are (not) OK during the Max-Age?  For
   example: the client MAY send a different request, in particular if
   the expected load for the server is smaller with that request?

5.  Security Considerations

   Replying to CoAP requests with a Response Code consumes resources
   from a server.  For a server under attack it may be more appropriate
   to simply drop requests without responding.

   If a CoAP reply with the Too Many Requests Response Code is not
   authenticated and integrity protected, an attacker can attempt to
   spoof a reply and make the client wait for an extended period of time
   before trying again.

6.  IANA Considerations

   IANA is requested to register the following Response Code in the
   "CoRE Parameters Registry", "CoAP Response Codes" sub-registry:

   o  Response Code: 4.29

   o  Description: Too Many Requests

   o  Reference: [[This document]]

Keranen                 Expires September 6, 2018               [Page 3]
Internet-Draft  Too Many Requests Response Code for CoAP      March 2018

7.  Acknowledgements

   This Response Code definition was originally part of the "Publish-
   Subscribe Broker for CoAP" document [I-D.ietf-core-coap-pubsub].
   Author would like to thank Gyorgy Rethy and Sandor Katona for their
   contributions and reviews.

8.  References

8.1.  Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/
              RFC2119, March 1997, <https://www.rfc-editor.org/info/
              rfc2119>.

   [RFC7252]  Shelby, Z., Hartke, K., and C. Bormann, "The Constrained
              Application Protocol (CoAP)", RFC 7252, DOI 10.17487/
              RFC7252, June 2014, <https://www.rfc-editor.org/info/
              rfc7252>.

8.2.  Informative References

   [I-D.ietf-core-coap-pubsub]
              Koster, M., Keranen, A., and J. Jimenez, "Publish-
              Subscribe Broker for the Constrained Application Protocol
              (CoAP)", draft-ietf-core-coap-pubsub-03 (work in
              progress), February 2018.

   [RFC6585]  Nottingham, M. and R. Fielding, "Additional HTTP Status
              Codes", RFC 6585, DOI 10.17487/RFC6585, April 2012,
              <https://www.rfc-editor.org/info/rfc6585>.

   [RFC7230]  Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
              Protocol (HTTP/1.1): Message Syntax and Routing", RFC
              7230, DOI 10.17487/RFC7230, June 2014, <https://www.rfc-
              editor.org/info/rfc7230>.

Author's Address

   Ari Keranen
   Ericsson

   Email: ari.keranen@ericsson.com

Keranen                 Expires September 6, 2018               [Page 4]