UUIDv7 doesn't have the properties you think it does
Thundering Herd and Cache Stampede
One expired key, a thousand simultaneous recomputations.
The mechanism. A hot cache key expires. Every concurrent request misses, and every one of them starts the expensive recomputation — the same query, the same render, the same fan-out. The origin receives a load spike proportional to your traffic, which is exactly when you can least afford it. Worse, the slow origin makes requests pile up, so the herd grows while it waits.
Three fixes, composable. Locking / request coalescing: the first miss takes a lock and computes; the others wait for its result or serve stale. Go's singleflight and Nginx's proxy_cache_lock are this. Stale-while-revalidate: serve the expired value immediately and refresh in the background, so no user ever waits for a recompute. Probabilistic early expiry: each reader independently decides to refresh with a probability that rises as the TTL approaches, so refreshes spread out instead of landing together.
TTL jitter. If you populate ten thousand keys in one deploy with identical TTLs, they expire together. Randomise TTLs by ±10% and the cliff becomes a slope.
Beyond caches. The same shape appears in cron jobs that all fire at 0 * * * *, clients that reconnect simultaneously after a deploy, and token refreshes that all expire at once. Any synchronised schedule is a herd waiting to happen.
Takeaway. Caches turn load problems into coordination problems. Coalesce, serve stale, and jitter your TTLs.