Backend Systems · Cluster

Caching

Invalidation, tiers, and stampedes.

  1. 01 Cache-Aside and Read-Through: Who Owns the Miss How responsibility for a cache miss is divided between application code and the cache itself, what each arrangement costs in round trips, and how they fail differently when a write races a read. foundational · Jun 17, 2025
  2. 02 TTL Expiry and the Two Ways an Entry Dies How deadline-based caching separates logical expiry from physical reclamation, why lazy and active expiry put the cost in different places, and how clocks and replicas make a TTL a bound rather than a promise. foundational · Jul 17, 2025
  3. 03 Why LRU Eviction Needs a Hash Map and a Linked List The data structure behind least-recently-used eviction, why exact recency ordering costs two pointers per entry, and what CLOCK and frequency-based policies give up to avoid that cost. foundational · Apr 10, 2025
  4. 04 Invalidation by Deletion and by Versioned Key Why deleting a cache entry after a write is a race rather than a guarantee, how versioned keys turn invalidation into a change of address, and what each approach costs when the cache and the source disagree. intermediate · Oct 22, 2025
  5. 05 Request Coalescing and Probabilistic Early Expiration What happens when a hot key expires under load, how single-flight and leases reduce the burst to one load, and how early recomputation spreads the remaining work before the deadline arrives. intermediate · Oct 16, 2023
  6. 06 Caching Absence with Negative Entries and Bloom Filters How a cache represents the answer "this does not exist", why missed negative lookups are more dangerous than missed positive ones, and what a Bloom filter costs in bits per key and false positives. intermediate · Apr 8, 2024
  7. 07 Consistent Hashing and What Resharding Costs a Cache Tier Why modular hashing turns a single added node into a near-total cache flush, how ring and rendezvous schemes bound the keys that move, and what slot-based clusters still charge for rebalancing. intermediate · Aug 26, 2026
  8. 08 Dual Writes, Replication Lag, and Read-Your-Writes Through a Cache Why a cache turns one write into two writes with no shared transaction, which orderings lose updates, and the session-level guarantees that make a client see its own changes without giving up the cache. advanced · Sep 20, 2024
  9. 09 In-Process Caches: Retained Heap and the Cost of a Hit What a per-process cache actually retains beyond its values, how object headers and hash-table slots multiply the footprint, and why the garbage collector makes an unbounded local cache a latency risk. advanced · Jul 29, 2026
  10. 10 Hit Ratio Arithmetic and How to Size a Cache Tier How to convert a hit ratio into source load and latency, why the miss-rate curve flattens before the working set is covered, and which measurement choices make a cache look better than it is. advanced · Jun 4, 2026