Question

Difficulty: MediumHigh-Performing Database Solutions

A solutions architect is designing a database solution for a global fleet tracking application. The application must ingest real-time telemetry data from over 100,000 delivery vehicles, resulting in millions of write transactions per minute. The system requires consistent sub-millisecond write latency. The fleet operations are highly dynamic, with write traffic peaking heavily during business hours and dropping to near zero at night. Each telemetry record includes a unique vehicle identifier (VehicleID), a monotonically increasing timestamp (Timestamp), and location coordinates. The architect selects Amazon DynamoDB as the datastore. Which database design and configuration should the solutions architect implement to meet these requirements?

  1. Design the DynamoDB table with VehicleID as the partition key and Timestamp as the sort key, and configure the table with On-Demand capacity mode.Answer
  2. B
    Design the DynamoDB table with Timestamp as the partition key and VehicleID as the sort key, and configure the table with Provisioned Capacity Mode.
  3. C
    Migrate the database to Amazon RDS for PostgreSQL with Multi-AZ, and configure Read Replicas in the primary Availability Zone to automatically scale and failover the write operations during peak hours.
  4. D
    Design the DynamoDB table with VehicleID as the partition key and Timestamp as the sort key, and configure Provisioned Capacity Mode with static read/write capacity units calculated from the average daily traffic.

Answer

Design the DynamoDB table with VehicleID as the partition key and Timestamp as the sort key, and configure the table with On-Demand capacity mode.
Designing the table with VehicleID as the partition key provides high cardinality, distributing writes evenly across multiple partitions. Configuring On-Demand capacity mode ensures that the table automatically scales up and down to handle the dynamic traffic fluctuations between business hours and night hours without manual provisioning or throttling.

Step-by-Step Solution

1
Analyze the access pattern and cardinality of partition key candidates to prevent partition throttling.
Using VehicleID as the partition key provides high cardinality and distributes writes across multiple partitions, whereas a monotonically increasing Timestamp creates a hot partition bottleneck.
DynamoDB distributes data across partitions based on the partition key hash; high cardinality prevents hot partitions.
2
Evaluate the workload traffic pattern to determine the optimal capacity mode.
On-Demand capacity mode is chosen because traffic is highly dynamic and spikes during business hours.
On-Demand mode automatically scales read and write throughput instantly to handle unpredictable or sharp traffic spikes, preventing write throttling.

Key Concept

DynamoDB Partition Key Design and Capacity Modes
Rate this question