DynamoDB Flashcards
Write Capacity Unit (WCU)
One write per second for an item up to 1 KB in size (round up to nearest 1 KB)
To write 10 items per second, with item size 2 KB, how many WCU’s are needed?
20 WCUs
10 * (2KB/1KB) = 20
To write 6 items per second, with an item size 4.5 KB, how many WCU’s are needed?
30 WCUs
6 * (5/1) = 30
To write 120 items per minute, with item size 2 KN, how many WCUs are needed?
4 WCUs
(120/60) * (2KB/1KB) = 4 WCUs
Read Capacity Unit (RCU)
One Strongly Consistent Read per second, or
Two Eventually Consistent Reads per second,
for an item up to 4 KB in size (round up to nearest 4 KB)
10 strongly consistent reads per second, with item size 4 kb
10 RCUs
10 * (4 kb/ 4 kb) = 10 RCUs
16 eventually consistent reads per second, with item size 12 kb
24 RCUs
(16 / 2) * (12 kb / 4kb) = 24 RCUS
10 strongly consistent reads per second, with item size 6 kb
20 RCUs
10 * (8 kb / 4 kb) = 20 RCUs
Before you create a DynamoDB table, you need to provision the EC2 instance the DynamoDB table will be running on.
A. True
B. False
B. False
DynamoDB is serverless with no servers to provision, patch, or manage and no software to install, maintain or operate. It automatically scales tables up and down to adjust for capacity and maintain performance. It provides both provisioned (specify RCU & WCU) and on-demand (pay for what you use) capacity modes
You have provisioned a DynamoDB table with 10 RCUs and 10 WCUs. A month later you want to increase the RCU to handle more read traffic. What should you do?
A. Increase RCU and keep WCU the same
B. You need to increase both RCU and WCU
C. Increase RCU and decrease WCU
A. Increase RCU and keep WCU the same
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?
A. Increase the RCU to a very high value
B. Create a DAX cluster
C. Migrate the database away from DynamoDB for the time of the sale
B. Create a DAX cluster
DynamoDB Accelerator (DAX) is a fully managed, highly available, in-memory cache for DynamoDB that delivers up to 10x performance improvement. It caches the most frequently used data, thus offloading the heavy reads on hot keys of your DynamoDB table, hence preventing the “ProvisionedThroughputExceededException” exception.
You have developed a mobile application that uses DynamoDB as its datastore. You want to automate sending welcome emails to new users after they sign up. What is the most efficient way to achieve this?
A. Schedule a Lambda function to run every minute using CloudWatch Events, scan the entire table looking for new users
B. Enable SNS and DynamoDB integration
C. Enable DynaboDB Streams and configure it to invoke a Lambda function to send emails
C. Enable DynaboDB Streams and configure it to invoke a Lambda function to send emails
DynamoDB Streams allows you to capture a time-ordered sequence of item-level modifications in a DynamoDB table. It’s integrated with AWS Lambda so that you create triggers that automatically respond to events in real-time.
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?
A. Use Provisioned Capacity Mode with Auto Scaling enabled for both development and production
B. Use provisioned Capacity Mode with Auto Scaling enabled for production and use On-Demand Capacity Mode for development
C. Use Provisioned Capacity Mode with Auto Scaling enabled for development and use On-Demand Capacity Mode for production
D. Use On-Demand Capacity Mode for both development and production
B. Use provisioned Capacity Mode with Auto Scaling enabled for production and use On-Demand Capacity Mode for development
The maximum size of an item in a DynamoDB table is ____
A. 400 KB
B. 500 KB
C. 400 MB
D. 1 MB
A. 400 KB
DynamoDB tables scale ____
A. Vertically
B. Horizontally
B. Horizontally