| draft-ietf-httpbis-cache-digest-00.txt | draft-ietf-httpbis-cache-digest-01.txt | |||
|---|---|---|---|---|
| Network Working Group K. Oku | Network Working Group K. Oku | |||
| Internet-Draft DeNA Co, Ltd. | Internet-Draft DeNA Co, Ltd. | |||
| Intended status: Standards Track M. Nottingham | Intended status: Standards Track M. Nottingham | |||
| Expires: January 10, 2017 July 9, 2016 | Expires: May 5, 2017 November 1, 2016 | |||
| Cache Digests for HTTP/2 | Cache Digests for HTTP/2 | |||
| draft-ietf-httpbis-cache-digest-00 | draft-ietf-httpbis-cache-digest-01 | |||
| Abstract | Abstract | |||
| This specification defines a HTTP/2 frame type to allow clients to | This specification defines a HTTP/2 frame type to allow clients to | |||
| inform the server of their cache's contents. Servers can then use | inform the server of their cache's contents. Servers can then use | |||
| this to inform their choices of what to push to clients. | this to inform their choices of what to push to clients. | |||
| Note to Readers | Note to Readers | |||
| Discussion of this draft takes place on the HTTP working group | Discussion of this draft takes place on the HTTP working group | |||
| skipping to change at page 1, line 42 ¶ | skipping to change at page 1, line 42 ¶ | |||
| Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
| Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
| working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
| Drafts is at http://datatracker.ietf.org/drafts/current/. | Drafts is at http://datatracker.ietf.org/drafts/current/. | |||
| Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
| and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
| time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
| material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
| This Internet-Draft will expire on January 10, 2017. | This Internet-Draft will expire on May 5, 2017. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2016 IETF Trust and the persons identified as the | Copyright (c) 2016 IETF Trust and the persons identified as the | |||
| document authors. All rights reserved. | document authors. All rights reserved. | |||
| This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
| Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
| (http://trustee.ietf.org/license-info) in effect on the date of | (http://trustee.ietf.org/license-info) in effect on the date of | |||
| publication of this document. Please review these documents | publication of this document. Please review these documents | |||
| skipping to change at page 2, line 20 ¶ | skipping to change at page 2, line 20 ¶ | |||
| to this document. Code Components extracted from this document must | to this document. Code Components extracted from this document must | |||
| include Simplified BSD License text as described in Section 4.e of | include Simplified BSD License text as described in Section 4.e of | |||
| the Trust Legal Provisions and are provided without warranty as | the Trust Legal Provisions and are provided without warranty as | |||
| described in the Simplified BSD License. | described in the Simplified BSD License. | |||
| Table of Contents | Table of Contents | |||
| 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | |||
| 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 3 | 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 3 | |||
| 2. The CACHE_DIGEST Frame . . . . . . . . . . . . . . . . . . . 3 | 2. The CACHE_DIGEST Frame . . . . . . . . . . . . . . . . . . . 3 | |||
| 2.1. Client Behavior . . . . . . . . . . . . . . . . . . . . . 3 | 2.1. Client Behavior . . . . . . . . . . . . . . . . . . . . . 4 | |||
| 2.1.1. Computing the Digest-Value . . . . . . . . . . . . . 4 | 2.1.1. Computing the Digest-Value . . . . . . . . . . . . . 5 | |||
| 2.1.2. Computing a Hash Value . . . . . . . . . . . . . . . 6 | 2.1.2. Computing a Hash Value . . . . . . . . . . . . . . . 6 | |||
| 2.2. Server Behavior . . . . . . . . . . . . . . . . . . . . . 6 | 2.2. Server Behavior . . . . . . . . . . . . . . . . . . . . . 6 | |||
| 2.2.1. Querying the Digest for a Value . . . . . . . . . . . 7 | 2.2.1. Querying the Digest for a Value . . . . . . . . . . . 7 | |||
| 3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 | 3. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 | |||
| 4. Security Considerations . . . . . . . . . . . . . . . . . . . 8 | 4. Security Considerations . . . . . . . . . . . . . . . . . . . 8 | |||
| 5. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 | 5. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 | |||
| 5.1. Normative References . . . . . . . . . . . . . . . . . . 8 | 5.1. Normative References . . . . . . . . . . . . . . . . . . 9 | |||
| 5.2. Informative References . . . . . . . . . . . . . . . . . 9 | 5.2. Informative References . . . . . . . . . . . . . . . . . 9 | |||
| Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 9 | Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 10 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 | |||
| 1. Introduction | 1. Introduction | |||
| HTTP/2 [RFC7540] allows a server to "push" synthetic request/response | HTTP/2 [RFC7540] allows a server to "push" synthetic request/response | |||
| pairs into a client's cache optimistically. While there is strong | pairs into a client's cache optimistically. While there is strong | |||
| interest in using this facility to improve perceived Web browsing | interest in using this facility to improve perceived Web browsing | |||
| performance, it is sometimes counterproductive because the client | performance, it is sometimes counterproductive because the client | |||
| might already have cached the "pushed" response. | might already have cached the "pushed" response. | |||
| When this is the case, the bandwidth used to "push" the response is | When this is the case, the bandwidth used to "push" the response is | |||
| effectively wasted, and represents opportunity cost, because it could | effectively wasted, and represents opportunity cost, because it could | |||
| be used by other, more relevant responses. HTTP/2 allows a stream to | be used by other, more relevant responses. HTTP/2 allows a stream to | |||
| be cancelled by a client using a RST_STREAM frame in this situation, | be cancelled by a client using a RST_STREAM frame in this situation, | |||
| but there is still at least one round trip of potentially wasted | but there is still at least one round trip of potentially wasted | |||
| capacity even then. | capacity even then. | |||
| This specification defines a HTTP/2 frame type to allow clients to | This specification defines a HTTP/2 frame type to allow clients to | |||
| inform the server of their cache's contents using a Golumb-Rice Coded | inform the server of their cache's contents using a Golumb-Rice Coded | |||
| Set. Servers can then use this to inform their choices of what to | Set [Rice]. Servers can then use this to inform their choices of | |||
| push to clients. | what to push to clients. | |||
| 1.1. Notational Conventions | 1.1. Notational Conventions | |||
| The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | |||
| "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this | "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this | |||
| document are to be interpreted as described in [RFC2119]. | document are to be interpreted as described in [RFC2119]. | |||
| 2. The CACHE_DIGEST Frame | 2. The CACHE_DIGEST Frame | |||
| The CACHE_DIGEST frame type is 0xf1. NOTE: This is an experimental | The CACHE_DIGEST frame type is 0xf1. NOTE: This is an experimental | |||
| value; if standardised, a permanent value will be assigned. | value; if standardised, a permanent value will be assigned. | |||
| +-----------------------------------------------+ | +-------------------------------+-------------------------------+ | |||
| | Digest-Value? (\*) ... | | Origin-Len (16) | Origin? (\*) ... | |||
| +-----------------------------------------------+ | +-------------------------------+-------------------------------+ | |||
| | Digest-Value? (\*) ... | ||||
| +---------------------------------------------------------------+ | ||||
| The CACHE_DIGEST frame payload has the following fields: | The CACHE_DIGEST frame payload has the following fields: | |||
| o *Digest-Value*: A sequence of octets containing the digest as | Origin-Len: An unsigned, 16-bit integer indicating the length, in | |||
| computed in Section 2.1.1. | octets, of the Origin field. | |||
| Origin: A sequence of characters containing the ASCII serialization | ||||
| of an origin ([RFC6454], Section 6.2) that the Digest-Value | ||||
| applies to. | ||||
| Digest-Value: A sequence of octets containing the digest as computed | ||||
| in Section 2.1.1. | ||||
| The CACHE_DIGEST frame defines the following flags: | The CACHE_DIGEST frame defines the following flags: | |||
| o *RESET* (0x1): When set, indicates that any and all cache digests | o *RESET* (0x1): When set, indicates that any and all cache digests | |||
| for the applicable origin held by the recipient MUST be considered | for the applicable origin held by the recipient MUST be considered | |||
| invalid. | invalid. | |||
| o *COMPLETE* (0x2): When set, indicates that the currently valid set | o *COMPLETE* (0x2): When set, indicates that the currently valid set | |||
| of cache digests held by the server constitutes a complete | of cache digests held by the server constitutes a complete | |||
| representation of the cache's state regarding that origin, for the | representation of the cache's state regarding that origin, for the | |||
| skipping to change at page 3, line 45 ¶ | skipping to change at page 4, line 7 ¶ | |||
| o *VALIDATORS* (0x4): When set, indicates that the "validators" | o *VALIDATORS* (0x4): When set, indicates that the "validators" | |||
| boolean in Section 2.1.1 is true. | boolean in Section 2.1.1 is true. | |||
| o *STALE* (0x8): When set, indicates that all cached responses | o *STALE* (0x8): When set, indicates that all cached responses | |||
| represented in the digest-value are stale [RFC7234] at the point | represented in the digest-value are stale [RFC7234] at the point | |||
| in them that the digest was generated; otherwise, all are fresh. | in them that the digest was generated; otherwise, all are fresh. | |||
| 2.1. Client Behavior | 2.1. Client Behavior | |||
| A CACHE_DIGEST frame can be sent from a client to a server on any | A CACHE_DIGEST frame MUST be sent from a client to a server on stream | |||
| stream in the "open" state, and conveys a digest of the contents of | 0, and conveys a digest of the contents of the client's cache for the | |||
| the client's cache for associated stream. | indicated origin. | |||
| In typical use, a client will send one or more CACHE_DIGESTs | In typical use, a client will send one or more CACHE_DIGESTs | |||
| immediately after the first request on a connection for a given | immediately after the first request on a connection for a given | |||
| origin, on the same stream, because there is usually a short period | origin, on the same stream, because there is usually a short period | |||
| of inactivity then, and servers can benefit most when they understand | of inactivity then, and servers can benefit most when they understand | |||
| the state of the cache before they begin pushing associated assets | the state of the cache before they begin pushing associated assets | |||
| (e.g., CSS, JavaScript and images). Clients MAY send CACHE_DIGEST at | (e.g., CSS, JavaScript and images). Clients MAY send CACHE_DIGEST at | |||
| other times. | other times. | |||
| If the cache's state is cleared, lost, or the client otherwise wishes | If the cache's state is cleared, lost, or the client otherwise wishes | |||
| the server to stop using previously sent CACHE_DIGESTs, it can send a | the server to stop using previously sent CACHE_DIGESTs, it can send a | |||
| CACHE_DIGEST with the RESET flag set. | CACHE_DIGEST with the RESET flag set. | |||
| When generating CACHE_DIGEST, a client MUST NOT include cached | When generating CACHE_DIGEST, a client MUST NOT include cached | |||
| responses whose URLs do not share origins [RFC6454] with the request | responses whose URLs do not share origins [RFC6454] with the | |||
| of the stream that the frame is sent upon. | indicated origin. Clients MUST NOT send CACHE_DIGEST frames on | |||
| connections that are not authoritative (as defined in [RFC7540], | ||||
| 10.1) for the indicated origin. | ||||
| CACHE_DIGEST allows the client to indicate whether the set of URLs | CACHE_DIGEST allows the client to indicate whether the set of URLs | |||
| used to compute the digest represent fresh or stale stored responses, | used to compute the digest represent fresh or stale stored responses, | |||
| using the STALE flag. Clients MAY decide whether to only sent | using the STALE flag. Clients MAY decide whether to only sent | |||
| CACHE_DIGEST frames representing their fresh stored responses, their | CACHE_DIGEST frames representing their fresh stored responses, their | |||
| stale stored responses, or both. | stale stored responses, or both. | |||
| Clients can choose to only send a subset of the suitable stored | Clients can choose to only send a subset of the suitable stored | |||
| responses of each type (fresh or stale). However, when the | responses of each type (fresh or stale). However, when the | |||
| CACHE_DIGEST frames sent represent the complete set of stored | CACHE_DIGEST frames sent represent the complete set of stored | |||
| skipping to change at page 7, line 18 ¶ | skipping to change at page 7, line 29 ¶ | |||
| stored CACHE_DIGESTs for its origin. Servers MUST treat an empty | stored CACHE_DIGESTs for its origin. Servers MUST treat an empty | |||
| Digest-Value with a RESET flag set as effectively clearing all stored | Digest-Value with a RESET flag set as effectively clearing all stored | |||
| digests for that origin. | digests for that origin. | |||
| Clients are not likely to send updates to CACHE_DIGEST over the | Clients are not likely to send updates to CACHE_DIGEST over the | |||
| lifetime of a connection; it is expected that servers will separately | lifetime of a connection; it is expected that servers will separately | |||
| track what cacheable responses have been sent previously on the same | track what cacheable responses have been sent previously on the same | |||
| connection, using that knowledge in conjunction with that provided by | connection, using that knowledge in conjunction with that provided by | |||
| CACHE_DIGEST. | CACHE_DIGEST. | |||
| Servers MUST ignore CACHE_DIGEST frames sent on a stream other than | ||||
| 0. | ||||
| 2.2.1. Querying the Digest for a Value | 2.2.1. Querying the Digest for a Value | |||
| Given: | Given: | |||
| o "digest-value", an array of bits | o "digest-value", an array of bits | |||
| o "URL", an array of characters | o "URL", an array of characters | |||
| o "ETag", an array of characters | o "ETag", an array of characters | |||
| skipping to change at page 8, line 43 ¶ | skipping to change at page 9, line 10 ¶ | |||
| be. | be. | |||
| Additionally, User Agents SHOULD NOT send CACHE_DIGEST when in | Additionally, User Agents SHOULD NOT send CACHE_DIGEST when in | |||
| "privacy mode." | "privacy mode." | |||
| 5. References | 5. References | |||
| 5.1. Normative References | 5.1. Normative References | |||
| [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | |||
| Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ | Requirement Levels", BCP 14, RFC 2119, | |||
| RFC2119, March 1997, | DOI 10.17487/RFC2119, March 1997, | |||
| <http://www.rfc-editor.org/info/rfc2119>. | <http://www.rfc-editor.org/info/rfc2119>. | |||
| [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform | [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform | |||
| Resource Identifier (URI): Generic Syntax", STD 66, RFC | Resource Identifier (URI): Generic Syntax", STD 66, | |||
| 3986, DOI 10.17487/RFC3986, January 2005, | RFC 3986, DOI 10.17487/RFC3986, January 2005, | |||
| <http://www.rfc-editor.org/info/rfc3986>. | <http://www.rfc-editor.org/info/rfc3986>. | |||
| [RFC6234] Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms | [RFC6234] Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms | |||
| (SHA and SHA-based HMAC and HKDF)", RFC 6234, DOI | (SHA and SHA-based HMAC and HKDF)", RFC 6234, | |||
| 10.17487/RFC6234, May 2011, | DOI 10.17487/RFC6234, May 2011, | |||
| <http://www.rfc-editor.org/info/rfc6234>. | <http://www.rfc-editor.org/info/rfc6234>. | |||
| [RFC6454] Barth, A., "The Web Origin Concept", RFC 6454, DOI | [RFC6454] Barth, A., "The Web Origin Concept", RFC 6454, | |||
| 10.17487/RFC6454, December 2011, | DOI 10.17487/RFC6454, December 2011, | |||
| <http://www.rfc-editor.org/info/rfc6454>. | <http://www.rfc-editor.org/info/rfc6454>. | |||
| [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer | [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer | |||
| Protocol (HTTP/1.1): Message Syntax and Routing", RFC | Protocol (HTTP/1.1): Message Syntax and Routing", | |||
| 7230, DOI 10.17487/RFC7230, June 2014, | RFC 7230, DOI 10.17487/RFC7230, June 2014, | |||
| <http://www.rfc-editor.org/info/rfc7230>. | <http://www.rfc-editor.org/info/rfc7230>. | |||
| [RFC7232] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer | [RFC7232] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer | |||
| Protocol (HTTP/1.1): Conditional Requests", RFC 7232, DOI | Protocol (HTTP/1.1): Conditional Requests", RFC 7232, | |||
| 10.17487/RFC7232, June 2014, | DOI 10.17487/RFC7232, June 2014, | |||
| <http://www.rfc-editor.org/info/rfc7232>. | <http://www.rfc-editor.org/info/rfc7232>. | |||
| [RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, | [RFC7234] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, | |||
| Ed., "Hypertext Transfer Protocol (HTTP/1.1): Caching", | Ed., "Hypertext Transfer Protocol (HTTP/1.1): Caching", | |||
| RFC 7234, DOI 10.17487/RFC7234, June 2014, | RFC 7234, DOI 10.17487/RFC7234, June 2014, | |||
| <http://www.rfc-editor.org/info/rfc7234>. | <http://www.rfc-editor.org/info/rfc7234>. | |||
| [RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext | [RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext | |||
| Transfer Protocol Version 2 (HTTP/2)", RFC 7540, DOI | Transfer Protocol Version 2 (HTTP/2)", RFC 7540, | |||
| 10.17487/RFC7540, May 2015, | DOI 10.17487/RFC7540, May 2015, | |||
| <http://www.rfc-editor.org/info/rfc7540>. | <http://www.rfc-editor.org/info/rfc7540>. | |||
| 5.2. Informative References | 5.2. Informative References | |||
| [RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265, | [RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265, | |||
| DOI 10.17487/RFC6265, April 2011, | DOI 10.17487/RFC6265, April 2011, | |||
| <http://www.rfc-editor.org/info/rfc6265>. | <http://www.rfc-editor.org/info/rfc6265>. | |||
| [Rice] Rice, R. and J. Plaunt, "Adaptive variable-length coding | ||||
| for efficient compression of spacecraft television data", | ||||
| IEEE Transactions on Communication Technology 19.6 , 1971. | ||||
| Appendix A. Acknowledgements | Appendix A. Acknowledgements | |||
| Thanks to Adam Langley and Giovanni Bajo for their explorations of | Thanks to Adam Langley and Giovanni Bajo for their explorations of | |||
| Golumb-coded sets. In particular, see | Golumb-coded sets. In particular, see | |||
| http://giovanni.bajo.it/post/47119962313/golomb-coded-sets-smaller- | http://giovanni.bajo.it/post/47119962313/golomb-coded-sets-smaller- | |||
| than-bloom-filters , which refers to sample code. | than-bloom-filters , which refers to sample code. | |||
| Thanks to Stefan Eissing for his suggestions. | Thanks to Stefan Eissing for his suggestions. | |||
| Authors' Addresses | Authors' Addresses | |||
| End of changes. 20 change blocks. | ||||
| 34 lines changed or deleted | 52 lines changed or added | |||
This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||