* WGs marked with an * asterisk has had at least one new draft made available during the last 5 days

Ticket #29 (closed design: fixed)

Opened 7 years ago

Last modified 4 years ago

Age calculation

Reported by: mnot@pobox.com Owned by: julian.reschke@gmx.de
Priority: normal Milestone: 10
Component: p6-cache Severity: Active WG Document
Keywords: Cc:
Origin: http://lists.w3.org/Archives/Public/ietf-http-wg/2002JulSep/0048.html

Description

RFC 2616 says:

Because the request that resulted in the returned Age value must have been initiated prior to that Age value's generation, we can correct for delays imposed by the network by recording the time at which the request was initiated. Then, when an Age value is received, it MUST be interpreted relative to the time the request was initiated... So, we compute:

corrected_initial_age = corrected_received_age + (now - request_time)

I suspect the formula does not match the true intent of the RFC authors. I believe that corrected_initial_age formula counts server-to-client delays twice. It does that because the corrected_received_age component already accounts for one server-to-client delay. Here is an annotated definition from the RFC:

corrected_received_age = max(
now - date_value, # trust the clock (includes server-to-client delay!)
age_value)        # all-HTTP/1.1 paths (no server-to-client delay)

I think it is possible to fix the corrected_initial_age formula to match the intent (note this is the *initial* not *received* age):

corrected_initial_age = max(
now - date_value,                # trust the clock (includes delays)
age_value + now - request_time)  # trust Age, add network delays

There is no need for corrected_received_age.

Moreover, it looks ALL the formulas computing current_age go away with the above new corrected_initial_age definition as long as "now" is still defined as "the current time" (i.e., the time when current_age is calculated):

current_age = corrected_initial_age

So, we end up with a single formula for all cases and all times:

current_age = max(now - date_value, age_value + now - request_time) = = now - min(date_value, request_time - age_value)

It even has a clear physical meaning -- the min() part is the conservative estimate of object creation time.

Attachments

i29.diff (1.6 KB) - added by julian.reschke@gmx.de 5 years ago.
Proposed patch for part 6.

Change History

comment:1 Changed 7 years ago by mnot@pobox.com

Proposal:

creation_time = min(date_value, request_time - age_value);
current_age = now - creation_time;

comment:2 Changed 7 years ago by mnot@pobox.com

  • version set to d00
  • Component set to cache
  • Milestone set to unassigned

comment:3 Changed 5 years ago by mnot@pobox.com

  • Owner set to fielding@gbiv.com
  • Priority set to normal

comment:4 Changed 5 years ago by fielding@gbiv.com

Note to self: compare the currently specified algorithm with the one in

http://ftp.ics.uci.edu/pub/ietf/http/draft-fielding-http-age-00.txt

comment:5 Changed 5 years ago by mnot@pobox.com

  • Severity set to Active WG Document

AFAICT draft-fielding-http-age is orthogonal; it repeats the algorithm from 2068, but explicitly doesn't propose any modification (see section 2).

Changed 5 years ago by julian.reschke@gmx.de

Proposed patch for part 6.

comment:6 Changed 5 years ago by julian.reschke@gmx.de

From [792]:

make age calculation a bit less conservative (related to #29)

comment:7 Changed 5 years ago by mnot@pobox.com

  • Milestone changed from unassigned to 10

comment:8 Changed 4 years ago by julian.reschke@gmx.de

From [795]:

make age calculation a bit less conservative - mention this in "Changes from RFC 2616" (related to #29)

comment:9 Changed 4 years ago by julian.reschke@gmx.de

  • Owner changed from fielding@gbiv.com to julian.reschke@gmx.de

pending review

comment:10 Changed 4 years ago by julian.reschke@gmx.de

  • Status changed from new to assigned

This is believed to be fixed in -09. Should be reviewed.

comment:11 Changed 4 years ago by mnot@pobox.com

I think you mean fixed in -10...

comment:12 Changed 4 years ago by julian.reschke@gmx.de

Indeed. So it was fixed after -09, and is pending until we get -10 out.

comment:13 Changed 4 years ago by julian.reschke@gmx.de

  • Status changed from assigned to closed
  • Resolution set to incorporated

comment:14 Changed 4 years ago by mnot@pobox.com

  • Status changed from closed to reopened
  • Resolution incorporated deleted

comment:15 Changed 4 years ago by mnot@pobox.com

  • Status changed from reopened to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.