DynamoDB and Cassandra: design the table from the query
DynamoDB and Cassandra both descend from the same idea, hash a partition key to a machine and keep rows sorted inside it, so using either well means writing the queries first and deriving the keys from them, then handling the hot partitions, secondary indexes, consistency settings and deletes that this model makes awkward.
What you'll be able to do
- Derive a partition key and sort key from a list of access patterns, and spot a query the table cannot serve
- Explain how global and local secondary indexes differ in consistency, cost and limits
- Size a hot partition against published per-partition throughput, and spread it with write sharding
- Choose Cassandra consistency levels per operation, and say what conditional writes, TTLs and tombstones cost
Before this: picking-a-datastore, replication-and-consistency, sharding-and-partitioning, consistent-hashing
Log in to read the rest of this lesson
DynamoDB and Cassandra both descend from the same idea, hash a partition key to a machine and keep rows sorted inside it, so using either well means writing the queries first and deriving the keys from them, then handling the hot partitions, secondary indexes, consistency settings and deletes that this model makes awkward. This walkthrough runs about 24 minutes, with runnable code you can edit and re-run as you read. A new account gets 7 days of Pro free, no card required.
Log in to continueThe first module of every track is free to read on the web: see what's open in System design.