write behind
A caching strategy that writes to the cache first and copies the data to the database later.
A crash before the delayed copy reaches the database loses writes that were already acknowledged.
In more detail
It is the fastest write strategy and the only common one that can lose a write the user was already told had succeeded. For that reason a strict durability promise, such as never losing a payment, forbids it.
Related terms
- write through — A caching strategy that writes every change to the cache and the database at the same time.
- cache aside — A caching strategy where the application checks the cache, and on a miss reads the database and stores the result itself.
- durability — The likelihood that stored data survives hardware failures without being lost, usually stated as a percentage per year.
Taught in
- Requirements: The Constraints That Shape The System — Scalable System Design & Distributed Architecture
- Caching Strategies And Topology — Scalable System Design & Distributed Architecture