Question

Difficulty: MediumCost-Optimized Database Design and Capacity Planning

A company is designing a new two-tier web application on AWS that requires two database components:

1. A metadata store that records user profiles and session preferences. This store experiences sudden, highly irregular spikes in read and write traffic during flash sales, with long periods of near-zero activity.
2. A relational transaction database containing order history that requires high availability, where read queries are highly repetitive and dominate the workload.

The company wants to design a database architecture that is highly resilient, performant, and cost-optimized. Which two database configurations should the solutions architect recommend to meet these requirements? (Select TWO.)

  1. Configure the metadata store using Amazon DynamoDB in On-Demand capacity mode.Answer
  2. Deploy the order history database as an Amazon RDS Multi-AZ DB instance and implement Amazon ElastiCache to cache the repetitive read queries.Answer
  3. C
    Configure the metadata store using Amazon DynamoDB in Provisioned Capacity mode with Auto Scaling enabled, set to a high write baseline.
  4. D
    Deploy the order history database as a Single-AZ Amazon RDS DB instance with multiple Read Replicas, and configure the replicas for automatic disaster recovery failover.
  5. E
    Deploy the order history database as an Amazon RDS Multi-AZ DB instance and purchase a Compute Savings Plan to reduce the database instance costs.

Answer

Configure the metadata store using Amazon DynamoDB in On-Demand capacity mode, and deploy the order history database as an Amazon RDS Multi-AZ DB instance and implement Amazon ElastiCache to cache the repetitive read queries.
For the metadata store, configuring Amazon DynamoDB in On-Demand capacity mode is the most cost-effective choice because the workload is highly irregular and spiky. This avoids over-provisioning capacity during idle times while ensuring the database scales automatically during flash sales. For the order history database, deploying an Amazon RDS Multi-AZ DB instance ensures high availability, while adding Amazon ElastiCache to cache the highly repetitive read queries offloads database traffic, allowing the database to be scaled down to a smaller, less expensive instance class.

Step-by-Step Solution

1
Analyze the capacity requirement for the metadata store.
The metadata store experiences sudden, highly irregular traffic spikes during flash sales, followed by long periods of near-zero activity. On-demand capacity mode is selected because it scales instantly to handle sudden spikes without manual intervention and incurs zero costs when there is no traffic.
Choosing the correct DynamoDB capacity mode directly impacts both performance reliability (throttling avoidance) and cost optimization (avoiding paying for idle provisioned throughput).
2
Evaluate the database tier requirements for the order history database.
The order history database requires high availability (HA). A Multi-AZ deployment is selected because it provides synchronous replication and automated failover.
High availability is a non-negotiable requirement for the order history database, making a Multi-AZ deployment necessary.
3
Optimize the performance and cost of the read-heavy database workload.
Read queries are highly repetitive. Placing Amazon ElastiCache in front of the RDS Multi-AZ DB instance offloads the repetitive reads from the primary database instance.
By reducing the read load on the database instance, the company can provision a smaller and cheaper instance class, significantly reducing RDS database costs.

Key Concept

Selecting cost-effective database capacity modes and using caching layers to reduce database instance sizes while maintaining high availability.
Rate this question