idnits 2.17.1 draft-keranen-core-too-many-reqs-01.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 19, 2018) is 2231 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-04 -- 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 19, 2018 5 Expires: September 20, 2018 7 Too Many Requests Response Code for the Constrained Application Protocol 8 draft-keranen-core-too-many-reqs-01 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 20, 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 . . . . . . . . . . . . . . . . . . . . . . 3 59 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 3 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 Max-Age option is used to 98 indicate the number of seconds after which the server assumes it is 99 OK for the client to retry the request. 101 4. CoAP Client Behavior 103 If a client receives the 4.29 Response Code from a CoAP server to a 104 request, it SHOULD NOT send the same request to the server before the 105 time indicated in the Max-Age option has passed. 107 A client MUST NOT rely on a server being able to send the 4.29 108 Response Code in an overload situation because an overloaded server 109 may not be able to reply to all requests at all. 111 5. Security Considerations 113 Replying to CoAP requests with a Response Code consumes resources 114 from a server. For a server under attack it may be more appropriate 115 to simply drop requests without responding. 117 If a CoAP reply with the Too Many Requests Response Code is not 118 authenticated and integrity protected, an attacker can attempt to 119 spoof a reply and make the client wait for an extended period of time 120 before trying again. 122 6. IANA Considerations 124 IANA is requested to register the following Response Code in the 125 "CoRE Parameters Registry", "CoAP Response Codes" sub-registry: 127 o Response Code: 4.29 129 o Description: Too Many Requests 131 o Reference: [[This document]] 133 7. Acknowledgements 135 This Response Code definition was originally part of the "Publish- 136 Subscribe Broker for CoAP" document [I-D.ietf-core-coap-pubsub]. 137 Author would like to thank Gyorgy Rethy, Klaus Hartke, and Sandor 138 Katona for their contributions and reviews. 140 8. References 141 8.1. Normative References 143 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 144 Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ 145 RFC2119, March 1997, . 148 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 149 Application Protocol (CoAP)", RFC 7252, DOI 10.17487/ 150 RFC7252, June 2014, . 153 8.2. Informative References 155 [I-D.ietf-core-coap-pubsub] 156 Koster, M., Keranen, A., and J. Jimenez, "Publish- 157 Subscribe Broker for the Constrained Application Protocol 158 (CoAP)", draft-ietf-core-coap-pubsub-04 (work in 159 progress), March 2018. 161 [RFC6585] Nottingham, M. and R. Fielding, "Additional HTTP Status 162 Codes", RFC 6585, DOI 10.17487/RFC6585, April 2012, 163 . 165 [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer 166 Protocol (HTTP/1.1): Message Syntax and Routing", RFC 167 7230, DOI 10.17487/RFC7230, June 2014, . 170 Author's Address 172 Ari Keranen 173 Ericsson 175 Email: ari.keranen@ericsson.com