HYX

Study 06 / HTTP caching

Hyx research study

Caching is a protocol, not a map.

A semantics study of freshness, variants, validators, stale delivery, request coalescing, ranges, and tiered storage beyond eviction policy.

Research classification

RFC-oriented semantics / 125 focused tests / parser microbenchmarks

E1 / finding
125
focused tests passed
cache semantics + storage + concurrency
E2 / finding
2.49ns
no-range fast gate
401.8M operations / second
E3 / finding
16.24ns
range parser
61.59M operations / second
E4 / finding
2
storage tiers
memory + bounded disk reserve

Abstract

The claim begins with a question, not a headline.

Research question / RQ-06

Can a tiered CDN cache combine aggressive reuse with the authorization, validation, variation, and partial-response constraints of HTTP?

Mobius answers how memory is retained under pressure. This study asks a different question: whether the response cache preserves the HTTP contracts that decide what may be stored, reused, revalidated, ranged, or served stale.

01

Method

Audit cacheability, freshness, validators, variants, stale controls, coalescing, ranges, metadata encoding, disk promotion, and capacity tests against HTTP caching requirements.

02

Finding

The cache is structured around response semantics and concurrent state transitions. Eviction is only one bounded subproblem inside a larger protocol machine.

03

Disclosure boundary

The study publishes externally observable contracts and test categories, not proprietary key composition, production thresholds, or internal coordination mechanics.

System boundary

A cached object carries policy, representation, and time.

S-01 / system topology

admit / vary / age / validate / serve

01

Admission

Method, status, Authorization, Cache-Control, Set-Cookie, and policy determine whether a response is reusable and under which constraints.

02

Representation

Vary-derived variants, typed response heads, validators, encoding, and byte ranges prevent one stored body from being served under the wrong request contract.

03

Freshness

Age, explicit lifetimes, heuristic rules, stale-while-revalidate, and stale-if-error govern reuse over time.

04

Coordination

Per-key revalidation locks and miss coalescing keep concurrent misses from multiplying origin work while memory and disk tiers remain bounded.

Controlled measurement

The measured nanoseconds belong to two narrow parsing gates.

M-01 / host-local evidence

release mode / scoped result

MeasurementObservedScope
01No Range header gate2.49nsearly path before range parsing
02Single range parse16.24nssynthetic header benchmark
03Focused suite125 passed3 benchmark tests ignored by default
04Storage modelmemory + diskbounded reserve and promotion semantics

Release-mode microbenchmarks on this host. These are not hit latency, origin latency, or end-to-end CDN throughput.

Findings

Correct reuse is a sequence of proofs.

01

A key is not enough

Vary and authorization rules determine whether two apparently identical URLs may share a stored representation.

02

Stale is policy

Stale-while-revalidate and stale-if-error are bounded permissions, not a generic license to return old bytes.

03

Validation mutates metadata

A 304 response merges selected metadata into the existing representation without replacing the stored body.

04

Concurrency changes semantics

Coalescing and per-key revalidation ensure one logical refresh does not become an origin stampede under load.

Correctness and safety

Protocol edge cases are encoded as executable constraints.

01

Authorization boundary

Shared reuse of authorized responses requires the explicit permissions defined by HTTP caching semantics.

02

Corruption rejection

Versioned cached heads reject incompatible or malformed metadata rather than constructing a response from ambiguous bytes.

03

Range discipline

Ranges are served only when the stored representation, validator, and requested interval permit a correct partial response.

04

Bounded tiers

Memory weight and disk budget are enforced independently; promotion cannot make capacity unbounded.

The repository evidence supports broad HTTP cache semantics and extensive focused tests. It does not establish a universal hit ratio, origin offload percentage, or end-to-end latency advantage because those depend on traffic and deployment.

Interpretation

The evidence boundary is part of the result.

01

Not an eviction sequel

This study does not repeat the Mobius/TinyUFO policy comparison. It examines protocol correctness around the stored object.

02

No traffic trace

Without a representative request trace, the study cannot claim a fleet hit ratio or stale-service frequency.

03

Microbenchmark boundary

The nanosecond figures cover range gates only, not metadata lookup, body transfer, disk IO, or origin revalidation.

Evidence register

Every public claim keeps its provenance attached.

E1

Semantic suite

125 tests passed across RFC-oriented behavior, response metadata, variants, ranges, coalescing, negative caching, disk reserve, and concurrency.

E2

Typed metadata

Cached response heads preserve multi-value headers and validators while rejecting incompatible versions and malformed data.

E3

Concurrent refresh

Tests constrain stale-while-revalidate locks, miss coalescing, 304 merge behavior, and bounded tier promotion.

E4

Range microbenchmarks

The host measured 2.49ns for the no-range gate and 16.24ns for the range parser in release mode.

Research archive

Return to the systems studies.

Mechanisms, measurements, and the limits required to interpret both.

Open the archive