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?
DynamoDB supports eventually consistent and strongly consistent reads. When you read data from a DynamoDB table, the response might not reflect the results of a recently completed write operation.
Despite advancements and rethought algorithms such as partially-synchronous models, CAP theorem remains relevant today.
Strong Consistency with High Availability In terms of the CAP theorem, DynamoDB is an Available & Partition-tolerant (AP) database with eventual write consistency. On the read front, it supports both eventually consistent and strongly consistent reads.
Strong Consistency While the DynamoDB table supports strongly consistent reading, it results after all mutations have been fully activated. Therefore, this model will guarantee the return of the most updated data. The process behind this behavior is by locking down the physical nodes as they update.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With