Knowledgebase

Designing for Consistency Print

  • softwareengineering, software, database, guide, howto, solution, zillionkinghost, hosting
  • 0

Agreement across a system.

WHAT STRONG CONSISTENCY MEANS

Every read returns the most recent write.

WHAT EVENTUAL CONSISTENCY MEANS

Reads may return stale data, converging over time.

WHY THAT TRADE-OFF EXISTS

In a distributed system, when parts cannot communicate, you must choose between remaining consistent and remaining available.

WHAT THAT MEANS PRACTICALLY

You cannot have both during a network partition.

WHAT REQUIRES STRONG CONSISTENCY

Money Inventory, where overselling matters Anything where a stale read causes a wrong decision

WHAT TOLERATES EVENTUAL CONSISTENCY

Counts and statistics Feeds and timelines Search results Most read-heavy content

WHAT TRANSACTIONS PROVIDE

A group of changes that all succeed or all fail.

WHY THAT MATTERS

Otherwise a partial failure leaves data in an invalid state.

WHAT TO BE CAREFUL WITH

Transactions spanning services, which is far harder than within one database.

WHAT TO PREFER

Designing so that a transaction is needed within one boundary only.

WHAT TO DECIDE EXPLICITLY

Which data requires which guarantee.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot