Question #520
A company is designing a new web application that will run on Amazon EC2 Instances. The application will use Amazon DynamoDB for backend data storage. The application traffic will be unpredictable. The company expects that the application read and write throughput to the database will be moderate to high. The company needs to scale in response to application traffic.
Which DynamoDB table configuration will meet these requirements MOST cost-effectively?
Configure DynamoDB with provisioned read and write by using the DynamoDB Standard table class. Set DynamoDB auto scaling to a maximum defined capacity.
Configure DynamoDB in on-demand mode by using the DynamoDB Standard table class.
Configure DynamoDB with provisioned read and write by using the DynamoDB Standard Infrequent Access (DynamoDB Standard-IA) table class. Set DynamoDB auto scaling to a maximum defined capacity.
Configure DynamoDB in on-demand mode by using the DynamoDB Standard Infrequent Access (DynamoDB Standard-IA) table class.
Explanation
Option B is correct because when the application has unpredictable traffic and expected moderate to high read and write throughput, using DynamoDB in on-demand mode provides flexibility and cost-effectiveness without the need to specify the provisioned capacity. This mode automatically adjusts to the demand, allowing for seamless scaling and eliminating the risk of over-provisioning (paying for unused capacity) or under-provisioning (leading to throttling and performance issues).
Here are the reasons why the other options are not suitable:
- A: While provisioning capacity with auto-scaling is a valid approach, it may lead to over-provisioning in times of low traffic, resulting in unnecessary costs. In on-demand mode, there is no need to worry about setting the maximum capacity.
- C: Similar to option A, this provisioning method could lead to over-provisioning costs, and using the Standard-IA table class is not necessary as it is intended for infrequent access data. This option also incorrectly assumes there will be a uniform access pattern.
- D: Although on-demand mode is a great fit, the use of the Standard-IA table class is inappropriate as it is designed for infrequent access patterns and does not suit moderate to high activity levels expected for this application.
Key Takeaway: When designing applications with varying traffic patterns, especially in scenarios with unpredictable spikes or drops in usage, opting for DynamoDB's on-demand mode is generally the most efficient and cost-effective choice that ensures availability and performance without manual intervention.
Answer
The correct answer is: B