retrystorm · Learn · Interview practice · Glossary · Components

Home › Reference › Glossary › Zipfian distribution

Zipfian distribution

Traffic where a few items get most of the requests and most get almost none.

Taught in Chapter 12: Caching.

More from the same chapter

  • Cache: Keeps copies of recent answers in memory to serve repeats without asking the database.
  • Cache-aside: The app checks the cache first and, on a miss, reads the database and fills the cache.
  • Hit rate: The share of requests a cache answers itself.
  • Invalidate: On a write, drop the cached copy so the next read fetches the new value.
  • Lease: A time-limited right. A cache uses one to refuse an answer fetched before the latest invalidation; a database primary uses one as its permission to accept writes.
  • Read-through cache: A cache that sits between the app and the database and fetches its own misses, so the app only ever asks the cache.
  • Stale read: A read that returns a value which has since changed.
  • Write-back: Write to the cache only and save to the database later: fast, but a crash can lose writes.
  • Write-through: On a write, update the cached copy along with the database.
About · Contact · Privacy · Terms of use