Skip to content

Commit dec7fbb

Browse files
authored
Merge pull request #21 from sysrqb/rechecking_consistency
Add some guidance on re-checking consistency
2 parents eac85f3 + f55dd04 commit dec7fbb

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

draft-group-privacypass-consistency-mirror.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ if the following criteria are met:
152152
1. The cached response is fresh according to its Cache-Control header (see {{Section 4.2 of ?CACHING=RFC9111}}).
153153

154154
If both criteria are met, the mirror encodes the cached response using Binary HTTP {{!BHTTP=RFC9292}}
155-
and returns it to the client in a response. The mirror response incldues a Cache-Control header
155+
and returns it to the client in a response. The mirror response includes a Cache-Control header
156156
with "max-age" directive set to that of the cached response.
157157

158158
Otherwise, mirrors send a GET request to the target resource URL, copying the Accept header from
@@ -313,6 +313,34 @@ be preferable to protocol-agnostic consistency checks based on the mirror protoc
313313
especially if they provide equivalent consistency guarantees with better performance
314314
or reliability.
315315

316+
## Consistency Validity Period
317+
318+
Executing a consistency check provides a client with some assurance that other
319+
clients may be using the same resource {{security-considerations}}. However,
320+
this result only reflects a mirror's view of a resource at a particular point
321+
in time. The client should periodically re-check consistency. The frequency of
322+
re-checking depends on the requirements of the client {{integration}}. Clients
323+
should re-confirm consistency of a cached resource if it is not fresh (see
324+
{{Section 4.2 of ?CACHING=RFC9111}}).
325+
326+
Two strategies for maintaining consistency are:
327+
1. Pre-emptively execute a consistency check for a resource that is expiring soon; and
328+
1. Execute a consistency check of an expired resource at the time of its next use.
329+
330+
For strategy 1, clients that execute consistency checks at the same time can
331+
induce a thundering herd that overwhelms the mirror resource. Since coordinating
332+
consistency checks across clients is difficult, clients can instead execute consistency
333+
checks at random times before the resource expires. Clients that have more information
334+
about a mirror's available capacity can choose different implementations for strategy 1.
335+
336+
Strategy 2 might be preferrable for a service and resource that is infrequently
337+
used. However, a consequence of this strategy is that it can reveal a client's
338+
usage patterns to the mirror.
339+
340+
When the origin server has multiple versions of a resource corresponding to a
341+
URL, it should respond with the resource that is both currently valid and will
342+
remain fresh for the longest amount of time in the future.
343+
316344
## Privacy Pass Profile {#profile-privacypass}
317345

318346
Clients are given as input an issuer token key from an origin server and want to check
@@ -364,7 +392,7 @@ Before using the configuration to encrypt a binary HTTP message to the gateway,
364392
a consistency check with their configured mirror(s) to ensure that this configuration is correct
365393
for the given gateway.
366394

367-
# Security Considerations
395+
# Security Considerations {#security-considerations}
368396

369397
Consistency checks assume that the client-configured set of mirrors is honest. Under this assumption,
370398
the consistency properties of consistency checks based on the mirror protocol are as follows:

0 commit comments

Comments
 (0)