26

Previously, DynamoDB was providing "eventual consistency" only, obeying "Availability" and "Partition Tolerance" portion of CAP theorem.

But now, DynamoDB provides "strong consistency" option apart from the "eventual consistency". Does that mean DynamoDB is not following CAP theorem?

starball
  • 20,030
  • 7
  • 43
  • 238
Neeraj Gupta
  • 765
  • 1
  • 10
  • 18
  • You are confused by the Dynamo paper which gave up consistency for availability. But DynamoDB is a totally different service from Dynamo. It born with strong consistency. – user8303658 Jul 13 '17 at 17:25
  • 1
    If you consider `reading from Dynamo takes a longer time` to be a form of unavailability, then it doesn't violate CAP. `availability` is the most hard to define concept in CAP, and is often misunderstood. – stackoverflower Oct 03 '18 at 13:46

1 Answers1

37

DynamoDB, in strongly consistent mode, trades against availability:

When you issue a strongly consistent read request, DynamoDB returns a response with the most up-to-date data that reflects updates by all prior related write operations to which DynamoDB returned a successful response. A strongly consistent read might be less available in the case of a network delay or outage. For the GetItem, Query or Scan operations, you can request a strongly consistent read result by specifying optional parameters in your request.

Thus, it violates no theoretical constraints.

Charles Duffy
  • 280,126
  • 43
  • 390
  • 441
  • 1
    One could also consider ProvisionedThroughputExceeded (throttling) and InternalServerError (service-side replication dynamics, networking issue, etc) responses from the service as unavailability. – Ben Schwartz Sep 11 '15 at 00:51