teacher
Sign in

Cassandra and DynamoDB

How wide-column stores spread data over a ring, trade consistency for availability, write through LSM trees, and why you model data from the queries backwards.

45 min4 interactive

What these stores are

Cassandra and DynamoDB are distributed databases built for huge write volume, horizontal scale and high availability. Both come from the 2007 Amazon Dynamo paper; Cassandra added Google's Bigtable-style storage engine. Both give up joins, ad-hoc queries and (mostly) multi-row transactions in exchange for predictable speed at any size.

  • Cassandra is open source (Apache), self-managed or hosted (for example by DataStax or on cloud providers). It is wide-column: a row can have many columns and rows with the same key are stored together sorted.
  • DynamoDB is a fully managed AWS key-value and document store. You never see servers.

Both tie into earlier lessons: sharding, consistent hashing and CAP and consistency.

1 of 11