Question

Difficulty: Very hardCost-Optimized Database Design and Capacity Planning

A software-as-a-service (SaaS) telemetry company is designing a metadata catalog using Amazon DynamoDB. The application has a predictable, continuous baseline workload of 4,0004,000 write requests per second (each 1 KB1\text{ KB} in size) and 8,0008,000 eventually consistent read requests per second (each 1 KB1\text{ KB} in size) running 24/724/7. Twice a week, during scheduled device reporting intervals, write requests surge suddenly to 40,00040,000 writes/second for a duration of 2 hours2\text{ hours}. The database storage grows by 1.5 TB1.5\text{ TB} per month, but 80%80\% of this data is historical telemetry older than 30 days30\text{ days} that is only accessed once a year for compliance auditing. To design the most cost-effective database architecture that prevents throttling during write spikes and minimizes storage costs, which TWO actions should the Solutions Architect take? (Select TWO.)

  1. Configure the DynamoDB table in Provisioned Capacity Mode, purchase DynamoDB Reserved Capacity to cover the baseline read and write throughput, and use an Amazon SQS queue to buffer incoming telemetry writes to absorb the 2-hour2\text{-hour} spikes.Answer
  2. Enable DynamoDB Time to Live (TTL) to automatically delete records older than 30 days30\text{ days}, and configure DynamoDB Streams with an AWS Lambda function to archive the deleted items to Amazon S3 Glacier Flexible Retrieval.Answer
  3. C
    Configure the DynamoDB table to use the DynamoDB Standard-Infrequent Access (Standard-IA) table class to reduce the ongoing storage costs of the growing dataset.
  4. D
    Configure the DynamoDB table in On-Demand capacity mode to automatically scale and accommodate both the baseline traffic and the twice-weekly write spikes without throttling.
  5. E
    Deploy DynamoDB Global Tables to replicate the database to a secondary AWS Region, routing the write spikes to the secondary region to distribute the capacity load and provide automatic failover.

Answer

The most cost-effective configuration uses DynamoDB Provisioned Capacity Mode with Reserved Capacity combined with an Amazon SQS queue to buffer the write spikes, alongside DynamoDB Time to Live (TTL) to expire data after 30 days30\text{ days} and archive it to Amazon S3 Glacier Flexible Retrieval via DynamoDB Streams and AWS Lambda.
The most cost-effective way to handle a high, stable baseline workload (4,0004,000 writes/second and 8,0008,000 reads/second) is using Provisioned Capacity Mode combined with Reserved Capacity, which offers significant discounts compared to standard provisioned rates. Since the write spikes are very high (40,00040,000 writes/second) but temporary and predictable, buffering the writes using an Amazon SQS queue allows the table to remain in Provisioned Capacity Mode without over-provisioning or paying for expensive On-Demand capacity. To minimize storage costs for the data older than 30 days30\text{ days} (which represents 80%80\% of the storage and is rarely accessed), enabling DynamoDB Time to Live (TTL) removes the data from DynamoDB automatically, and DynamoDB Streams can be used with AWS Lambda to archive the deleted items to Amazon S3 Glacier Flexible Retrieval for low-cost compliance storage.

Step-by-Step Solution

1
Analyze the baseline and peak write/read throughput patterns.
Identify a high, constant baseline of 4,0004,000 writes/second and 8,0008,000 reads/second, alongside short-lived write spikes of 40,00040,000 writes/second.
Understanding the ratio of steady-state to peak workloads dictates the optimal capacity mode selection.
2
Evaluate the cost options for baseline throughput capacity.
Determine that Provisioned Capacity Mode with Reserved Capacity is the most cost-effective option for the constant 24/724/7 baseline workload.
Reserved Capacity offers substantial discounts for predictable baseline resource usage compared to On-Demand capacity.
3
Formulate a strategy to absorb the write spikes without over-provisioning.
Introduce an Amazon SQS queue to buffer incoming write requests during the 2-hour2\text{-hour} spikes, allowing the database to ingest them at a steady rate.
This prevents write throttling and avoids provisioning 40,00040,000 write capacity units (or using expensive On-Demand pricing) for transient spikes.
4
Address the storage growth and archival requirements.
Enable DynamoDB TTL to remove records older than 30 days30\text{ days} and use DynamoDB Streams with AWS Lambda to archive them to Amazon S3 Glacier Flexible Retrieval.
This reduces the active database size by 80%80\%, keeping storage costs low in DynamoDB Standard while retaining historical data in a highly cost-efficient archival tier.

Key Concept

Cost-optimized database capacity planning using Provisioned Capacity with Reserved Capacity, write buffering (SQS), and lifecycle archival (TTL + S3 Glacier).
Rate this question