HTTP-client suggested Push Preference
draft-pot-prefer-push-01

Document Type Active Internet-Draft (individual)
Last updated 2019-05-02
Stream (None)
Intended RFC status (None)
Formats plain text xml pdf htmlized 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                                              May 02, 2019
Intended status: Standards Track
Expires: November 3, 2019

                 HTTP-client suggested Push Preference
                        draft-pot-prefer-push-01

Abstract

   "Prefer-Push" is a HTTP header that a client may use to request that
   a server uses HTTP/2 Push to send related resources as identified by
   their link relationships.

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 https://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 November 3, 2019.

Copyright Notice

   Copyright (c) 2019 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
   (https://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.

Pot                     Expires November 3, 2019                [Page 1]
Internet-Draft    HTTP-client suggested Push Preference         May 2019

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 than generating each response
       individually.

   These mechanisms also pose an issue.  To HTTP clients and
   intermediaries such as proxies and caches resources are opaque.  They
   are not aware of a concept of embedded resources.

   One example where this might fail is if a client recieves a resource,
   embedded in another resource, a cache might not be aware of this

Pot                     Expires November 3, 2019                [Page 2]
Internet-Draft    HTTP-client suggested Push Preference         May 2019

   resource and serve a stale, older version when this resource is
   requesed directly.

   To keep the performance advantage of being able to generate a related
   set of HTTP responses together, HTTP/2 Push could be an alternative
   to embedding.

   HTTP/2 Push allows the server to initiate a request and response pair
   and send them to the client early if the server thinks it will need
   them.  Another advantage of HTTP/2 push over embedding is that it
   allows resources of mixed mediatypes to be pushed.

   Servers can however not always anticipate which resources a client
   might want pushed.  To avoid guessing, this specification introduces
   a "Prefer-Push" header that allows a client to inform a server which
   resources they will need next.

   In many REST apis, sub-ordiniate or embedded resources are identified
   by their link relation.  By using the link relation, it will be
Show full document text