Chapter 14: Data and failure

ACID

Four promises a transaction makes. Atomic: all of it or none. Consistent: your rules still hold afterwards. Isolated: others don't see it half-done. Durable: once it's committed it stays, through a crash. It's a word you'll hear in interviews, and each letter is something you can break.

Agents will pick a data store for you, and some of the popular ones give up one of these letters by default or by configuration. Knowing the four lets you ask a real question: what happens to this write if the machine dies a millisecond after you told the user it worked?

Say it to your agent

“Before you pick a store for payments, tell me for each ACID letter what it guarantees and under what settings. In particular, is a write on disk before the client hears yes? Quote the docs for the version we would use.”

The workshop

Name a word, or describe what you mean in everyday language.