Pattern 09 / CACHE

Write-Behind (Write-Back)

Use this when absorbing high write volume with low perceived latency.

Pressure
Absorbing high write volume with low perceived latency
Mechanism
Write into cache or memory first, then flush changes to durable storage asynchronously in batches
Toll
A crash before flush can lose data and the database intentionally lags
Architecture plate09
Diagram for Write-Behind (Write-Back)
Executive brief

Write-Behind (Write-Back) fits when absorbing high write volume with low perceived latency. Mechanism: write into cache or memory first, then flush changes to durable storage asynchronously in batches. Use it for leaderboards, counters, telemetry, session state, and bursty writes. The toll: a crash before flush can lose data and the database intentionally lags.

Use when

Leaderboards, counters, telemetry, session state, and bursty writes.

Example

Game score updates buffered then persisted in batches.

Review framing

Describe the pressure first, then the mechanism, then the cost. That keeps the design grounded.

Same pressure family

Caching Patterns

07Cache-Aside (Lazy Loading)08Write-Through10Read-Through11Cache Stampede Prevention
โ† 0810 โ†’