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
Keranen Standards Track [Page 1]
RFC 8516 "Too Many Requests" Response Code for CoAP January 2019
Table of Contents
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.
Keranen Standards Track [Page 2]
RFC 8516 "Too Many Requests" Response Code for CoAP January 2019 2. TerminologyThe key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
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 Max-Age option is used to indicate the number of seconds after which the server assumes it is OK for the client to retry the request.
4. CoAP Client Behavior
If a client receives the 4.29 response code from a CoAP server to a request, it SHOULD NOT send a similar request to the server before the time indicated in the Max-Age option has passed. If the 4.29 response does not contain a Max-Age option, the default value (60 seconds, as defined in Section 5.10.5 of [RFC7252]) is assumed. Note that a client may receive a 4.29 response code on a first request to a server. This can happen, for example, if there is a proxy on the path and the server replies based on the load from multiple clients aggregated by the proxy, or if a client has restarted recently and does not remember its recent requests.
Keranen Standards Track [Page 3]
RFC 8516 "Too Many Requests" Response Code for CoAP January 2019
A client should 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 at all to some requests.
5. Security Considerations
Security considerations of [RFC7252] apply to this response code also.
6. IANA Considerations
IANA has registered the following response code in the "CoAP Response Codes" subregistry within the "Constrained RESTful Environments (CoRE) Parameters" registry:
Keranen Standards Track [Page 4]
RFC 8516 "Too Many Requests" Response Code for CoAP January 2019 7. References 7.1. Normative References[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
7.2. Informative References
[CoAP-BROKER]
Keranen Standards Track [Page 5]
RFC 8516 "Too Many Requests" Response Code for CoAP January 2019
Acknowledgements