NoSQL & DynamoDB Flashcards
What is DynamoDB (DDB)?
A fully managed DBaaS providing wide-column key/value stores.
In what ways is DynamoDB resilient?
Across AZs and optionally global.
How are DynamoDB tables keyed?
Either with a simple key (the partition key) or a composite key (the partition key and a sort key).
What is the byte-size maximum for a DynamoDB item?
400KB. This includes the key(s).
How is DynamoDB capacity allocated?
Capacity refers to performance, not storage, and is broken up into Write Capacity Unites (WCUs) and Read Capacity Units (RCUs).
What is Point-in-time Recovery (PITR) and how does it work?
Optional per-table feature that, when enabled, continuously streams backups for a 35 day window. Restores can be applied from this window with 1-second granularity.
What is DynamoDB billing based on?
RCU, WCU, Storage needed, and any enabled features like PITR.
Reservation commitments are available for known, long-term needs.
How many RCUs/WCUs are consumed per operation?
4KB per RCU per second, and 1KB per WCU per second. Every operation consumes at least one R/WCU - small operations can be considered to “round up.”
When running Scan operations on a DynamoDB table, how are RCUs calculated?
The number of RCUs consumed is based on the byte size of the entire table, not just the returned items. Scanned but not returned items still consume capacity during a Scan.
For example, Scanning at table with 38KB of items will always consume 10 RCUs (⌈38KB / 4KB⌉) for strongly-consistent reads.
What are the consistency options in DynamoDB?
Eventually consistent and strictly consistent.
Strongly consistent reads always connect to the leader node, while eventually consistent reads choose a random node and cost half the capacity.
How do DynamoDB Local Secondary Indexes (LSI) work?
LSIs are alternative views of a table that allow the definition of alternative SK (sort key). They share RCU and WCU capacity with the base table.
How many LSIs can be created per DynamoDB Table?
Five.
Can you add LSIs to an already defined DynamoDB table?
No. They must be created at the same time as the base table.
Are DynamoDB indexes sparse or dense?
Sparse. Items which don’t include an attribute value for the index’s key(s) are omitted from the view.
How do DynamoDB Global Secondary Indexes (LSI) work?
GSIs are alternative views of a table that allow the definition of both and alternative PK and SK. They do not share RCU and WCU capacity with the base table.