HTTP-client suggested Push Preference

Document Type Active Internet-Draft (individual)
Last updated 2018-12-02
Stream (None)
Intended RFC status (None)
Formats plain text xml pdf html bibtex
Stream Stream state (No stream defined)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                             E. Pot
Internet-Draft                                         December 02, 2018
Intended status: Standards Track
Expires: June 5, 2019

                 HTTP-client suggested Push Preference



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

   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 June 5, 2019.

Copyright Notice

   Copyright (c) 2018 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
   ( 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.

Pot                       Expires June 5, 2019                  [Page 1]
Internet-Draft    HTTP-client suggested Push Preference    December 2018

1.  Introduction

   HTTP/2 [RFC7540] allows a server to push request and response pairs
   to HTTP clients.  This can save round-trips between server and client
   and reduces the total time required for a client to retrieve all
   requested resources.

   This mechanism is completely controlled by the server, and it is up
   to implementors of services to anticipate what resources a client
   might need next.

   This specification defines a new HTTP header that allows a client to
   inform a server of resources they will require next based on a link
   relation type [RFC8288].

2.  Rationale

   Many HTTP-based services provide some mechanism to embed the HTTP
   response bodies of resources into other HTTP resource.  A common
   example of this is when a resource is structured as a "collection of
   resources".  Examples of this include:

   o  The Atom Syndication Format [RFC4287] that encodes "ATOM:entry"
      XML elements for each subordinate.

   o  The [HAL] format, which provides an "_embedded" element to
      embedding bodies of resources in other resources.

   o  The [JSON-API] format, which provides a "included" property to
      embed resources.

   Embedding resource responses in other resources has two major
   peformance advantages:

   1.  It reduces the number of roundtrips.  A client can make a single
       HTTP request and get many responses.

   2.  Generating a related set of resources can often be implemented on
       a server to be less time consuming that generating each response

   These mechanism also poses an issue.  HTTP clients and intermediaries
   are not aware of these embedded resources, because there was never a
   true HTTP request.

   By leveraging HTTP/2 push instead of format-specific embedding
   mechanisms, it's possible for services to push subordinate resources
   as soon as possible, generate HTTP responses as a "set" all while

Pot                       Expires June 5, 2019                  [Page 2]
Internet-Draft    HTTP-client suggested Push Preference    December 2018

   still taking advantage of existing HTTP infrastructure.  Another
   advantage of HTTP/2 push over embedding it that it allows resources
   of mixed mediatypes to be pushed.

   In many REST apis, sub-ordiniate or embedded resources are identified
   by their link relation.  By using the link relation, it will be
   possible for a client to indicate to a server which links they intent
   to follow, allowing a server to only push the resources that the
   client knows it will need.

3.  The header format

   This format should uses the "List" format from the Structured Headers
   format [I-D.ietf-httpbis-header-structure].

   GET /articles HTTP/1.1
   Prefer-Push: item, author, ""

4.  Handling a Prefer-Push request

   When a server receives the "Prefer-Push" header, it can choose to
   push the related resources.  It's up to the discretion of the
   implementor to decide which resources to push.  A server is also free
   to ignore push-requests.

   [RFC8288] defines Web Links as an abstract concept that can be
Show full document text