idnits 2.17.1 draft-ietf-core-too-many-reqs-03.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (July 22, 2018) is 2104 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-14) exists of draft-ietf-core-coap-pubsub-05 -- Obsolete informational reference (is this intentional?): RFC 7230 (Obsoleted by RFC 9110, RFC 9112) Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group A. Keranen 3 Internet-Draft Ericsson 4 Intended status: Standards Track July 22, 2018 5 Expires: January 23, 2019 7 Too Many Requests Response Code for the Constrained Application Protocol 8 draft-ietf-core-too-many-reqs-03 10 Abstract 12 A Constrained Application Protocol (CoAP) server can experience 13 temporary overload because one or more clients are sending requests 14 to the server at a higher rate than the server is capable or willing 15 to handle. This document defines a new CoAP Response Code for a 16 server to indicate that a client should reduce the rate of requests. 18 Status of This Memo 20 This Internet-Draft is submitted in full conformance with the 21 provisions of BCP 78 and BCP 79. 23 Internet-Drafts are working documents of the Internet Engineering 24 Task Force (IETF). Note that other groups may also distribute 25 working documents as Internet-Drafts. The list of current Internet- 26 Drafts is at http://datatracker.ietf.org/drafts/current/. 28 Internet-Drafts are draft documents valid for a maximum of six months 29 and may be updated, replaced, or obsoleted by other documents at any 30 time. It is inappropriate to use Internet-Drafts as reference 31 material or to cite them other than as "work in progress." 33 This Internet-Draft will expire on January 23, 2019. 35 Copyright Notice 37 Copyright (c) 2018 IETF Trust and the persons identified as the 38 document authors. All rights reserved. 40 This document is subject to BCP 78 and the IETF Trust's Legal 41 Provisions Relating to IETF Documents 42 (http://trustee.ietf.org/license-info) in effect on the date of 43 publication of this document. Please review these documents 44 carefully, as they describe your rights and restrictions with respect 45 to this document. Code Components extracted from this document must 46 include Simplified BSD License text as described in Section 4.e of 47 the Trust Legal Provisions and are provided without warranty as 48 described in the Simplified BSD License. 50 Table of Contents 52 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 53 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 54 3. CoAP Server Behavior . . . . . . . . . . . . . . . . . . . . 3 55 4. CoAP Client Behavior . . . . . . . . . . . . . . . . . . . . 3 56 5. Security Considerations . . . . . . . . . . . . . . . . . . . 3 57 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4 58 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 4 59 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 4 60 8.1. Normative References . . . . . . . . . . . . . . . . . . 4 61 8.2. Informative References . . . . . . . . . . . . . . . . . 4 62 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 5 64 1. Introduction 66 The Constrained Application Protocol (CoAP) [RFC7252] Response Codes 67 are used by a CoAP server to indicate the result of the attempt to 68 understand and satisfy a request sent by a client. 70 CoAP Response Codes are similar to the HTTP [RFC7230] Status Codes 71 and many codes are shared with similar semantics by both CoAP and 72 HTTP. HTTP has the code "429" registered for "Too Many Requests" 73 [RFC6585]. This document registers a CoAP Response Code "4.29" for 74 similar purpose and also defines use of the Max-Age option to 75 indicate a back-off period after which a client can try the request 76 again. 78 While a server may not be able to respond to one kind of request, it 79 may be able to respond to a request of different kind, even from the 80 same client. Therefore the back-off period applies only to similar 81 requests. For the purpose of this response code, a request is 82 similar if it has the same method and Request-URI. Also if a client 83 is sending a sequence of requests that are part of the same series 84 (e.g., a set of measurements to be processed by the server) they can 85 be considered similar even if request URIs may be different. Because 86 request similarity is context-dependent, it is up to the application 87 logic to decide how the similarity of the requests should be 88 evaluated. 90 The 4.29 code is similar to the 5.03 "Service Unavailable" [RFC7252] 91 code in a way that the 5.03 code can also be used by a server to 92 signal an overload situation. However the 4.29 code indicates that 93 the too frequent requests from the requesting client are the reason 94 for the overload. 96 2. Terminology 98 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 99 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 100 "OPTIONAL" in this document are to be interpreted as described in BCP 101 14 [RFC2119] [RFC8174] when, and only when, they appear in all 102 capitals, as shown here. 104 Readers should also be familiar with the terms and concepts discussed 105 in [RFC7252]. 107 3. CoAP Server Behavior 109 If a CoAP server is unable to serve a client that is sending CoAP 110 request messages more often than the server is capable or willing to 111 handle, the server SHOULD respond to the request(s) with the Response 112 Code 4.29, "Too Many Requests". The Max-Age option is used to 113 indicate the number of seconds after which the server assumes it is 114 OK for the client to retry the request. 116 An action result payload (see Section 5.5.1 in [RFC7252]) can be sent 117 by the server to give more guidance to the client, e.g., about the 118 details of the overload situation. 120 4. CoAP Client Behavior 122 If a client receives the 4.29 Response Code from a CoAP server to a 123 request, it SHOULD NOT send a similar request to the server before 124 the time indicated in the Max-Age option has passed. 126 A client MUST NOT rely on a server being able to send the 4.29 127 Response Code in an overload situation because an overloaded server 128 may not be able to reply to all requests at all. 130 5. Security Considerations 132 Replying to CoAP requests with a Response Code consumes resources 133 from a server. For a server under attack it may be more appropriate 134 to simply drop requests without responding. 136 If a CoAP reply with the Too Many Requests Response Code is not 137 authenticated and integrity protected, an attacker can attempt to 138 spoof a reply and make the client wait for an extended period of time 139 before trying again. 141 6. IANA Considerations 143 IANA is requested to register the following Response Code in the 144 "CoRE Parameters Registry", "CoAP Response Codes" sub-registry: 146 o Response Code: 4.29 148 o Description: Too Many Requests 150 o Reference: [[This document]] 152 7. Acknowledgements 154 This Response Code definition was originally part of the "Publish- 155 Subscribe Broker for CoAP" document [I-D.ietf-core-coap-pubsub]. 156 Author would like to thank Abhijan Bhattacharyya, Carsten Bormann, 157 Gyorgy Rethy, Klaus Hartke, and Sandor Katona for their contributions 158 and reviews. 160 8. References 162 8.1. Normative References 164 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 165 Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ 166 RFC2119, March 1997, . 169 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 170 Application Protocol (CoAP)", RFC 7252, DOI 10.17487/ 171 RFC7252, June 2014, . 174 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 175 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 176 May 2017, . 178 8.2. Informative References 180 [I-D.ietf-core-coap-pubsub] 181 Koster, M., Keranen, A., and J. Jimenez, "Publish- 182 Subscribe Broker for the Constrained Application Protocol 183 (CoAP)", draft-ietf-core-coap-pubsub-05 (work in 184 progress), July 2018. 186 [RFC6585] Nottingham, M. and R. Fielding, "Additional HTTP Status 187 Codes", RFC 6585, DOI 10.17487/RFC6585, April 2012, 188 . 190 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 191 Protocol (HTTP/1.1): Message Syntax and Routing", RFC 192 7230, DOI 10.17487/RFC7230, June 2014, . 195 Author's Address 197 Ari Keranen 198 Ericsson 200 Email: ari.keranen@ericsson.com