liveBook · Manning

Eventual consistency

As explained in Amazon Web Services in Action, Third Edition: An in-depth guide to AWS

Eventual consistency is a consistency model in which replicas or derived views may temporarily differ after a write but converge to the updated state.

Eventual consistency allows replicas or derived views to temporarily return older data after a write. Later reads converge when updates propagate. section 12.4.6

DynamoDB applies the model in several practical ways:

  • Returns an older item version after an update when a different replica answers the request. section 12.4.6
  • Updates global secondary indexes asynchronously, so index queries are always eventually consistent. section 12.4.3 section 12.4.6
  • Uses ConsistentRead: true with getItem, query, or scan when a strongly consistent read is required; this increases latency, cost, and read-capacity use. section 12.4.6

Retrying an eventually consistent external update

A fault-tolerant application retries a social-media status update, but an immediate lookup may not reveal the first post. It must choose whether to tolerate a missing update or duplicate updates. section 16.2.2

Figure 12.5 Eventually consistent reads can return old values after a write operation until the change is propagated to all machines.

Shows how reads can return old values after a write until the change reaches all machines. section 12.4.6

How Amazon Web Services in Action, Third Edition: An in-depth guide to AWS covers it

How deep it goes
Explains stale replicas, asynchronous indexes, strong-read configuration, and cost-latency trade-offs, but does not detail propagation internals.
Examples
Uses updated DynamoDB item versions, asynchronously maintained indexes, and retried social-media status updates as concrete examples.
What you can do after
Diagnose stale DynamoDB reads and choose between eventual and strongly consistent retrieval when designing retries.
How it connects
Connects eventual consistency with DynamoDB, global secondary indexes, strongly consistent reads, idempotent retries, and distributed systems.

Also explained in

Compare how 6 books explain eventual consistency →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Amazon Web Services in Action, Third Edition: An in-depth guide to AWS. The section links point to the parts of the book it draws on.