Dynamo DB Flashcards
An application doing Strongly Consistent reads of 10 items per second, with each item 10 KB in size. What RCU do you choose?
30
An application doing Eventually Consistent reads of 12 items per second, with each item 16 KB in size. What RCU do you choose?
We can do 2 Eventually Consistent reads per seconds for items of 4 KB with 1 RCU. 12 * (16 KB / 4 KB) = 48 / 2 = 24 RCU.
You are working on designing a new DynamoDB table where you want to make a Query using an attribute that’s NOT part of your table’s Primary Key. You need to use the >= predicate while keeping the same Partition Key. What should you do to make this query efficient?
Local secondary index
Which feature of DynamoDB allows you to achieve Optimistic Locking?
conditional writes
You would like to paginate the results of a DynamoDB Scan operation in order to minimize the number of items returned in the CLI’s output. Which of the following AWS CLI options should you use?
-max-items &-starting-token
You have an e-commerce website where you are using DynamoDB as your database. You are about to enter the Christmas sale and you have a few items which are very popular and you expect that they will be read often. Unfortunately, last year due to the huge traffic you had the ProvisionedThroughputExceededException exception. What would you do to prevent this error from happening again?
create dax cluster
You are running an application in production that is leveraging DynamoDB as its datastore and is experiencing smooth sustained usage. There is a need to make the application run in development mode as well, where it will experience an unpredictable volume of requests. What is the most cost-effective solution that you recommend?
use provisioned capacity mode with auto scaling for production and on demand capacity for development
DynamoDB tables scale ……………………..
horizontaly
An application doing Strongly Consistent reads of 10 items per second, with each item 10 KB in size. What RCU do you choose?
10 KB gets rounded to 12 KB. 10 * (12 KB / 4 KB) = 30 RCU.
wHAT RECORDS CAN BE IN DYNAMODB STREAMS
Stream records can be:
* Sent to Kinesis Data Streams
* Read by AWS Lambda
* Read by Kinesis Client Library applications
data retention time in db streams
24h
dynamod db dax vs elasticache
dynamodb scan characteristic
Returns up to 1 MB of data – use pagination to keep on reading
Consumes a lot of RCU
Can use ProjectionExpression & FilterExpression
how to improve scan
use Parallel Scan
Partition Key + Sort Key (HASH + RANGE) characteristic
- The combination must be unique for each item
- Data is grouped by partition key