liveBook · Manning

Tunable consistency

As explained in Grokking Software Architecture

Tunable consistency is a database configuration that lets developers choose the consistency guarantees and response speed for a request.

A bank balance and a video view count don’t need the same response. Tunable consistency lets developers choose, for each request, how strictly a database should guarantee data accuracy versus how quickly it should respond. section 8.2.2

When data is mirrored across servers, a write can wait for every server to confirm it, favoring consistency over speed. Moving on after one server acknowledges it favors speed instead. With looser consistency, one reader might see an older version while another sees the new one. section 8.2.2

Choose by consequence

For a bank balance, prioritize safety and wait for stronger confirmation. For a video view count, a faster response may be worth temporarily less accurate data. MongoDB’s Write Concern provides a practical configuration reference: https://www.mongodb.com/docs/manual/reference/write-concern/ section 8.2.2

How Grokking Software Architecture covers it

How deep it goes
Explains write acknowledgment extremes and their tradeoff without providing configuration steps.
Examples
Contrasts safety for a bank balance with performance for a video view count.
What you can do after
Evaluate consistency and speed choices for requests according to their data needs.
How it connects
Connects consistency choices to distributed systems, ACID, and BASE.

Also explained in

Compare how 2 books explain tunable consistency →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Software Architecture. The section links point to the parts of the book it draws on.