Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What documentation exists for DynamoDB's consistency model, CAP, partition recovery etc?

I'm considering using Amazon's DynamoDB. Naturally, if you're bothering to use a highly available distributed data store, you want to make sure your client deals with outages in a sensible way!

While I can find documentation describing Amazon's "Dynamo" database, it's my understanding that "DynamoDB" derives its name from Dynamo, but is not at all related in any other way.

For DynamoDB itself, the only documentation I can find is a brief forum post which basically says "retry 500 errors". For most other databases much more detailed information is available.

Where should I be looking to learn more about DynamoDB's outage handling?

like image 463
mjt Avatar asked Dec 26 '22 06:12

mjt


1 Answers

While Amazon DynamoDB indeed lacks a detailed statement about their choices regarding the CAP theorem (still hoping for a DynamoDB edition of Kyle Kingsbury's most excellent Jepsen series - Call me maybe: Cassandra analyzes a Dynamo inspired database), Jeff Walker Code Ranger's answer to DynamoDB: Conditional writes vs. the CAP theorem confirms the lack of clear information in this area, but asserts that we can make some pretty strong inferences.

The referenced forum post also suggests a strong emphasis on availability too in fact:

DynamoDB does indeed synchronously replicate across multiple availability zones within the region, and is therefore tolerant to a zone failure. If a zone becomes unavailable, you will still be able to use DynamoDB and the service will persist any successful writes that we have acknowledged (including writes we acknowledged at the time that the availability zone became unavailable).

The customer experience when a complete availability zone is lost ranges from no impact at all to delayed processing times in cases where failure detection and service-side redirection are necessary. The exact effects in the latter case depend on whether the customer uses the service's API directly or connects through one of our SDKs.

Other than that, Werner Vogels' posts on Dynamo/DynamoDB provide more insight eventually:

  • Amazon's Dynamo - about the original paper
  • Amazon DynamoDB – a Fast and Scalable NoSQL Database Service Designed for Internet Scale Applications - main introductory article including:

    • History of NoSQL at Amazon – Dynamo
    • Lessons learned from Amazon's Dynamo
    • Introducing DynamoDB - this features the most relevant information regarding the subject matter

      Durable and Highly Available. Amazon DynamoDB replicates its data over at least 3 different data centers so that the system can continue to operate and serve data even under complex failure scenarios.

      Flexible. Amazon DynamoDB is an extremely flexible system that does not force its users into a particular data model or a particular consistency model. DynamoDB tables do not have a fixed schema but instead allow each data item to have any number of attributes, including multi-valued attributes. Developers can optionally use stronger consistency models when accessing the database, trading off some performance and availability for a simpler model. They can also take advantage of the atomic increment/decrement functionality of DynamoDB for counters. [emphasis mine]

  • DynamoDB One Year Later: Bigger, Better, and 85% Cheaper… - about improvements

Finally, Aditya Dasgupta's presentation about Amazon's Dynamo DB also analyzes its modus operandi regarding the CAP theorem.

Practical Guidance

In terms of practical guidance for retry handling, the DynamoDB team has meanwhile added a dedicated section about Handling Errors, including Error Retries and Exponential Backoff.

like image 121
Steffen Opel Avatar answered Mar 29 '23 23:03

Steffen Opel