Visualizers
Learn by moving things
Interactive explainers for the ideas behind retrieval, embeddings, and agents. A formula tells you what is true; dragging a vector shows you why. Each one also appears inside the article it belongs to, and runs entirely in your browser, so drag, poke, and break it.

Locking / single-flight
From: The Cache Stampede: When a Hot Key Expires →Only the first request that misses takes a lock and goes to the database; the rest wait for it instead of piling on. One query refills the cache and everyone waiting shares the result.
On the miss, only the first request takes a lock and goes to the database. The other four see the lock and wait instead of piling on. The database gets one query.
Stale-while-revalidate
From: The Cache Stampede: When a Hot Key Expires →On expiry, keep serving the slightly stale value so nobody waits, and kick off a single background refresh. No request is blocked and the database takes exactly one query.
On expiry, keep serving the slightly stale value to everyone immediately, so nobody waits, and kick off a single background refresh to the database.
Probabilistic early expiration
From: The Cache Stampede: When a Hot Key Expires →As the TTL runs down, each request has a small, rising chance of refreshing early in the background. One volunteers before the timer hits zero, so the key is never empty and the herd never forms.
The key still has plenty of time to live, so the chance any request refreshes early is tiny. Everyone just hits the cache.