awesome-everything RU
↑ Back to the climb

Caching

ETags: multiple-choice review

Crux Multiple-choice synthesis across the ETag unit: what 304 saves, the conditional-request flow, strong vs weak validators, ETag vs Last-Modified, and the per-node failure mode.
Your altitude — climbing toward senior
ZeroJuniorMiddleSenior
You are at senior altitude — in orbit
◷ 13 min

Six questions that cut across the whole unit. Each one mirrors a call you make in a real caching review — not a header to recite, but a tradeoff to weigh when bandwidth, latency, and consistency pull against each other.

Goal

Confirm you can connect what a 304 saves, how the conditional-request handshake works, strong vs weak validators, ETag vs Last-Modified, and the per-node failure that silently kills revalidation behind a load balancer.

Quiz

A dashboard polls an 8 KB JSON config every 30s over an 80 ms RTT link. You add ETags and every unchanged poll now returns 304. What did you actually buy?

Quiz

You scaled an API from 1 to 3 pods behind a round-robin load balancer, and revalidation stopped returning 304s — every poll is a clean 200. What is the most likely root cause?

Quiz

A client sends If-None-Match with the strong tag "a3f5c901" and the server's current validator is the weak form W/"a3f5c901". Does the server return 304, and why?

Quiz

When does the strong-vs-weak distinction actually change behaviour, rather than being cosmetic?

Quiz

A high-write config row can change several times within the same second. A teammate proposes Last-Modified / If-Modified-Since because it is cheaper than hashing. What is the risk, and what is the precise validator?

Quiz

A proxy starts gzip-compressing responses on the fly between two deploys, and previously-cached strong validators begin behaving incorrectly. Why?

Recap

The unit’s through-line is one sentence applied five ways: a 304 saves the body bytes, never the round-trip. Revalidation is a versioning handshake — fingerprint, echo, compare — and it only works when the ETag is a pure function of the content, so every node agrees. Strong validators promise byte identity (mandatory for range requests); weak ones promise semantic equivalence, and If-None-Match compares weakly anyway, so the distinction mostly bites on resumed downloads. ETags beat Last-Modified on precision because timestamps have a one-second blind spot. And the failures — per-node tokens, mtime drift, compression changing the bytes — all resolve back to the same rule: keep the ETag content-derived.

Continue the climb ↑ETags: free-recall review
shortcuts expand
search
K
prev piece
k
next piece
j
cycle tier
t
this menu
?
sources2
expand
  1. 01
  2. 02

Trademarks belong to their respective owners. Editorial reference only.