Network Working Group B. de hOra Internet-Draft Zalando SE Intended status: Informational June 15, 2016 Expires: December 17, 2016 The respond-sync Prefer header preference draft-dehora-respond-sync-00 Abstract [RFC7240] standardizes a means of indicating client preferences using the "Prefer" header. This specification defines a "Prefer" header preference extension to indicate synchronous processing, called "respond-sync". 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 December 17, 2016. Copyright Notice Copyright (c) 2016 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. de hOra Expires December 17, 2016 [Page 1] Internet-Draft The respond-sync Prefer header preference June 2016 1. Introduction [RFC7240] standardizes a means of indicating client preferences using the "Prefer" header. This specification defines a "Prefer" header preference to indicate synchronous processing, called "respond-sync". 1.1. Terminology The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when they appear in this document, are to be interpreted as described in [RFC2119]. 2. The "respond-sync" Preference The "respond-sync" preference indicates that the client prefers the server to respond synchronously to a request. For instance, in the case where the server would respond with a 202 (Accepted) response but the client is willing to wait, the server MAY honor the "respond- sync" preference by returning a 201 (Created) or a 200 (Ok) response instead. ABNF [RFC5234]: respond-sync = "respond-sync" Clients MAY send a "wait" preference in conjunction with the "respond-sync" preference to indicate an upper bound on how long it is willing to wait for the server to process the request. The motivation for the "respond-sync" preference is to support synchronous request handling by allowing a client to indicate to a server its preference for synchronous and non-202 responses where the server would normally return a 202 (Accepted) response, but not require specifying timing directives as per the "wait" preference defined in [RFC7240]. An example request specifying the "respond-sync" preference: POST /collection HTTP/1.1 Host: example.org Content-Type: application/json Prefer: respond-sync {"property": "value"} An example synchronous response using 201 (Created): de hOra Expires December 17, 2016 [Page 2] Internet-Draft The respond-sync Prefer header preference June 2016 HTTP/1.1 201 Created Location: https://example.org/collection/123 3. IANA Considerations If this work is accepted, IANA is requested to register the "respond- sync" preference per [RFC7240] to the HTTP Preferences registry as follows: o Preference: respond-sync o Value: None o Optional Parameters: None o Description: Indicates the client prefers that the server respond synchronously to a request. o Reference: This specification, Section 2. 4. Security Considerations A server could incur greater costs in attempting to comply with a synchronous preference than performing work asynchronously. Unconditional compliance from a server could allow the use of the preference for denial of service when presented by multiple clients. A server can ignore the preference to avoid allocating resources to the request that it does not wish to commit. 5. Informative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/RFC5234, January 2008, . [RFC7240] Snell, J., "Prefer Header for HTTP", RFC 7240, DOI 10.17487/RFC7240, June 2014, . de hOra Expires December 17, 2016 [Page 3] Internet-Draft The respond-sync Prefer header preference June 2016 Author's Address Bill de hOra Zalando SE Email: bill@dehora.net de hOra Expires December 17, 2016 [Page 4]