GOAT EngineerPreparing your learning space…

System Design · Hatch · Interactive chapter

The Database Is the Bottleneck

Remove repeated reads from the source without pretending the cache is the source of truth.

Hatch already uses an index to resolve one short code efficiently. Traffic changes the problem: thousands of individually reasonable lookups now compete for the same database connections and compute. Making one query efficient did not remove the aggregate read bottleneck.

This public chapter lets you place Redis in front of PostgreSQL, trace the first miss and later hit, and test how hit ratio changes source load. The goal is to learn when a copied value helps and to keep the miss, freshness, and failure paths explicit.

What you will be able to do

  • Separate per-query efficiency from aggregate database read volume.
  • Trace cache-aside across a miss, cache fill, and later hit.
  • Use hit ratio to estimate source load and defend freshness trade-offs.

Ideas used in the chapter

  • Caching
  • cache-aside
  • Redis
  • hit ratio
  • TTL
  • invalidation
  • cache stampede

The full interactive lesson is available on this page without an account. Sign in only if you want GOAT Engineer to save your decisions and resume position.

Back to the Hatch saga. Read our Privacy Policy, Terms, or contact [email protected].