~/talk

Building a Highly Concurrent Cache in Go: A Hitchhiker's Guide

Talkat GopherCon 2023 · 2023-09-26..09-29· [go, software-architecture]
slides:none on file

Builds a Redis-fronting in-memory cache that replays 30‑minute production access logs (benchmarks pinned to 5,000 events per run) to compare eviction strategies; finds LRU faster for throughput but a Decaying LFU variant (DFU decaying LFU) improves hit rate. Uses go parallel benchmarks, benchstat and pprof (block and CPU) to find lock contention, then moves eviction to a background goroutine and swaps to xsync.Map + atomics, yielding ~100× faster reads/writes but ~2,000× slower eviction; rolls out with 1–10% sampling and per-lookup context timeouts.

AI-written summary · about

  1. 0:00Introduction
  2. 1:37Dont Panic
  3. 7:28Cash Replacement Policies
  4. 11:19Benchmarks
  5. 20:11DLFU
  6. 26:01Incremental Progress
  7. 27:03Context Timeouts
  8. 28:42SyncMap
  9. 35:45Benchmark
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.