Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'Interaction with HTTP Freshness' #1624

Merged
merged 4 commits into from
Sep 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions draft-ietf-httpbis-proxy-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,13 @@ See the registry at <https://iana.org/assignments/http-proxy-status> for details

Upon publication, please create the HTTP Proxy-Status Parameters registry and the HTTP Proxy Error Types registry at <https://iana.org/assignments/http-proxy-status> and populate them with the types defined in {{params}} and {{error-types}} respectively; see {{register-param}} and {{register-error}} for its associated procedures.

Additionally, please register the following entry in the Hypertext Transfer Protocol (HTTP) Field Name Registry:

* Field name: Proxy-Status
* Status: permanent
* Specification document(s): \[this document\]
* Comments:


# Security Considerations {#security}

Expand Down
37 changes: 37 additions & 0 deletions draft-ietf-httpbis-targeted-cache-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,21 @@ normative:
RFC2119:

informative:
AGE-PENALTY:
target: https://dl.acm.org/doi/10.5555/1251440.1251447
title: The age penalty and its effect on cache performance
date: March 2001
author:
-
ins: E. Cohen
name: Edith Cohen
organization: "AT&T Labs - Research"
email: edith@research.att.com
-
ins: H. Kaplan
name: Haim Kaplan
organization: School of Computer Science, Tel-Aviv University
email: haimk@math.tau.ac.il


--- abstract
Expand Down Expand Up @@ -135,6 +150,28 @@ However, implementers MAY reuse a Cache-Control parser for simplicity. If they d
If a targeted field in a given response is empty, or a parsing error is encountered (when being parsed as a Structured Field), that field SHOULD be ignored by the cache (i.e., it should behave as if the field were not present, likely falling back to other cache control mechanisms present).


## Interaction with HTTP Freshness

HTTP caching has a single, end-to-end freshness model defined in {{Section 4.2 of !I-D.ietf-httpbis-cache}}. When additional freshness mechanisms are only available to some caches along a request path (for example, using targeted fields), their interactions need to be carefully considered. In particular, a targeted cache might have longer freshness lifetimes available to it than other caches, causing it to serve responses that appear to be prematurely (or even immediately) stale to them, negatively impacting cache efficiency.

For example, a response stored by a CDN cache might be served with the following headers:

~~~ http-message
Age: 1800
Cache-Control: max-age=600
CDN-Cache-Control: max-age=3600
~~~

From the CDN's perspective, this response is still fresh after being cached for 30 minutes, while from other caches' standpoint, this response is already stale. See {{AGE-PENALTY}} for more discussion.

When the targeted cache has a strong coherence mechanism (e.g., the origin server has the ability to proactively invalidate cached responses), it is often desirable to mitigate these effects. Some techniques seen in deployments include:

* Removing the Age header field
* Updating the Date header field value to the current time
* Updating the Expires header field value to the current time, plus any Cache-Control: max-age value

This specification does not place any specific requirements on implementations to mitigate these effects, but definitions of targeted fields can do so.


## Defining Targeted Fields

Expand Down