idnits 2.17.1 draft-keranen-core-too-many-reqs-00.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 seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (March 5, 2018) is 2242 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-03 -- Obsolete informational reference (is this intentional?): RFC 7230 (Obsoleted by RFC 9110, RFC 9112) Summary: 0 errors (**), 0 flaws (~~), 3 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 March 5, 2018 5 Expires: September 6, 2018 7 Too Many Requests Response Code for the Constrained Application Protocol 8 draft-keranen-core-too-many-reqs-00 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 September 6, 2018. 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 . . . . . . . . . . . . . . . . . . . . . . . . . 2 54 3. CoAP Server Behavior . . . . . . . . . . . . . . . . . . . . 2 55 4. CoAP Client Behavior . . . . . . . . . . . . . . . . . . . . 3 56 5. Security Considerations . . . . . . . . . . . . . . . . . . . 3 57 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 3 58 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 4 59 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 4 60 8.1. Normative References . . . . . . . . . . . . . . . . . . 4 61 8.2. Informative References . . . . . . . . . . . . . . . . . 4 62 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 4 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 when a client can try the request again. 77 The 4.29 code is similar to the 5.03 "Service Unavailable" [RFC7252] 78 code in a way that the 5.03 code can also be used by a server to 79 signal an overload situation. However the 4.29 code indicates that 80 the too frequent requests from the requesting client are the reason 81 for the overload. 83 2. Terminology 85 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL NOT', 86 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and 'OPTIONAL' in this 87 specification are to be interpreted as described in [RFC2119]. 89 Readers should also be familiar with the terms and concepts discussed 90 in [RFC7252]. 92 3. CoAP Server Behavior 94 If a CoAP server is unable to serve a client that is sending CoAP 95 request messages more often than the server is capable or willing to 96 handle, the server SHOULD respond to the request(s) with the Response 97 Code 4.29, "Too Many Requests". The server MAY include in the 98 response a Max-Age option indicating the number of seconds after 99 which the server assumes it is OK for the client to retry the 100 request. 102 TBD: If a server chooses to (not)accept a request based on the 103 method/resource, how should this be indicated in the reply? 105 4. CoAP Client Behavior 107 If a client receives the 4.29 Response Code from a CoAP server to a 108 request, it SHOULD NOT send the same request to the server before the 109 time indicated in the Max-Age option has passed. If the response 110 does not contain Max-Age option, the client SHOULD wait for the Max- 111 Age default value, 60 seconds. 113 A client MUST NOT rely on a server being able to send the 4.29 114 Response Code in an overload situation because an overloaded server 115 may not be able to reply to all requests at all. 117 TBD: what kind of requests are (not) OK during the Max-Age? For 118 example: the client MAY send a different request, in particular if 119 the expected load for the server is smaller with that request? 121 5. Security Considerations 123 Replying to CoAP requests with a Response Code consumes resources 124 from a server. For a server under attack it may be more appropriate 125 to simply drop requests without responding. 127 If a CoAP reply with the Too Many Requests Response Code is not 128 authenticated and integrity protected, an attacker can attempt to 129 spoof a reply and make the client wait for an extended period of time 130 before trying again. 132 6. IANA Considerations 134 IANA is requested to register the following Response Code in the 135 "CoRE Parameters Registry", "CoAP Response Codes" sub-registry: 137 o Response Code: 4.29 139 o Description: Too Many Requests 141 o Reference: [[This document]] 143 7. Acknowledgements 145 This Response Code definition was originally part of the "Publish- 146 Subscribe Broker for CoAP" document [I-D.ietf-core-coap-pubsub]. 147 Author would like to thank Gyorgy Rethy and Sandor Katona for their 148 contributions and reviews. 150 8. References 152 8.1. Normative References 154 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 155 Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ 156 RFC2119, March 1997, . 159 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 160 Application Protocol (CoAP)", RFC 7252, DOI 10.17487/ 161 RFC7252, June 2014, . 164 8.2. Informative References 166 [I-D.ietf-core-coap-pubsub] 167 Koster, M., Keranen, A., and J. Jimenez, "Publish- 168 Subscribe Broker for the Constrained Application Protocol 169 (CoAP)", draft-ietf-core-coap-pubsub-03 (work in 170 progress), February 2018. 172 [RFC6585] Nottingham, M. and R. Fielding, "Additional HTTP Status 173 Codes", RFC 6585, DOI 10.17487/RFC6585, April 2012, 174 . 176 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 177 Protocol (HTTP/1.1): Message Syntax and Routing", RFC 178 7230, DOI 10.17487/RFC7230, June 2014, . 181 Author's Address 183 Ari Keranen 184 Ericsson 186 Email: ari.keranen@ericsson.com