Acknowledge before durable persistence#
Write-behind, also called write-back, updates a cache or buffer and persists to the backing store asynchronously. It can batch many high-volume counter changes and reduce source writes.
| Advantage | Risk introduced |
|---|---|
| Low acknowledgement latency | Data loss before persistence |
| Write coalescing and batches | Ordering and retry complexity |
| Lower backing-store write load | Shutdown, replay, and recovery work |
Aggregate view counters
One million page views do not always require one million immediate durable counter writes. A cache can accumulate increments and flush batches. The product must accept bounded loss or provide a durable log and idempotent replay.
Related practice problems
Use the manifest-backed prompts below to apply this lesson in a complete design.
- Caching challenges and strategiesAmazon Builders' Library