Dynamo DB Flashcards
Is DynamoDB single region?
No
Does it support SQL?
No
What consistency model DynamoDB supports by default?
Eventual consistency
What consistency model DynamoDB supports?
Eventual (default) and strong consistency
What is disadvantage of strongly consistent read?
It may fail if data is not available.
What ACID consistency stands for?
Atomic Consistent Isolated Durable
What BASE consistency stands for?
Basic Availability, Soft-state, Eventual-consistency
What DynamoDB price model is based on?
The pricing is based on throughput. User should define how may reads/writes is needed per minute.
How Autoscale works with DynamoDB?
Auto scaling rules scale up based on throughput. Scaling down is tricky process.
What is On-Demand complicity
When you do not know upfront read/write capacity DynamoDB will automatically determine needed capacity. It is cheaper to go with Auto-scale, provisioning through put upfront.
How to achieve ACID compliance?
By using DynamoDB transactions.
How DynamoDB identifies a document?
- By using partition key that are use to calculate hash. The hash is used to identify a partition where data is
located. - By using partition key and sort key. Partition key defines a partition. sort index determines sort order with in a partition.
What is Global Secondary Index
Partition key and sort key can be different from those on the table. Global means that it is not restricted for a partition data is stored in…
What is Local Secondary Index
Same partition key as in a table but sort key may be different.
What is the limit for amount of secondary indexes?
No limit. But indexes take up a storage space.
What is the use case for GLOBAL Secondary Index?
Fast query attributes by index outside of primary key.
What is the use case to use LOCAL secondary index?
When you know primary key and want to get by other sort key.
What is projection?
Projection is required to create a secondary index. Projections are stored in separate tables. The table attributes are copied to these storage. Projections always occur with [partition key]+[sort index].
Keep cost down, and minimal latency to access just a few attributes the faster way possible?
Projecting just those attributes in GLOBAL Secondary Index. It will keep cost MINIMAL, and will give lowest possible latency for those fields.
Keep cost moderate and lowest latency when FREQUENTLY access some-non key attributes.
Projecting those attributes with global secondary index. It will minimize cost otherwise caused by scans.
What to do in order to frequently query all attributes?
Projecting it or even entire table with secondary index will double the price (basically it is maintaining a duplicate table). But it gives maximum flexibility querying the table.
What to do to rarely query but write or update frequently?
Project keys only for global secondary index.
Minimal cost. Fast writes or updates for non-partition items