Read/Write Amplification
2 min read
One logical operation often triggers many physical ones — spot when 1 → N is breaking you.
One logical operation often triggers many physical ones — spot when 1 → N is breaking you.
How It Works
Amplification is when one user-facing action produces many downstream operations. Three common types: write amplification — in an LSM-tree database (a storage design that buffers writes in memory then merges them to disk in sorted files), a single write can trigger multiple I/Os as the data gets compacted across storage levels. Read amplification — a cold Caching miss triggers a cache check plus a database read plus an index lookup plus a cache fill, which is 4 operations for one logical read. Fan-out amplification — posting one tweet for a user with 100M followers triggers 100M downstream timeline writes. The signal: compare requests/sec at your API layer to operations/sec at your database. Healthy systems land near 1
. When the ratio drifts to 1 or 1, you have found your bottleneck.Real-World Example
Twitter's fan-out-on-write model — where posting a tweet immediately pushes a copy into each follower's timeline — triggers one downstream write per follower. A celebrity with 100M followers produces 100M writes per tweet. Twitter solves this by switching accounts above a follower threshold to fan-out-on-read, where the timeline is assembled lazily when the follower opens the app. The amplification is contained because most users stay in the cheap fan-out-on-write mode.
Test Yourself
Scenario: A news feed service reports 5,000 user-facing read QPS at the API gateway, but Postgres shows 180,000 queries/sec on the read path. Diagnose the amplification factor and the most likely cause.
Get notified when we launch
One email when the full practice product is live. No spam.