Question

Difficulty: HardData Store Operations with Amazon DynamoDB

A developer is designing an online bookstore's catalog system where inventory updates and search queries must be highly optimized. The application writes 4040 book metadata updates per second to an Amazon DynamoDB table, with each write payload size averaging 2.7 KB2.7\text{ KB}. To support real-time inventory dashboards, the application runs 1515 strongly consistent `Query` operations per second. Each `Query` returns a list of 1212 book items associated with a specific publisher (the partition key), and each book item has an average size of 1.5 KB1.5\text{ KB}. Which of the following represents the minimum provisioned read capacity units (RCUs) and write capacity units (WCUs) required to support this workload?

  1. 75 RCUs75\text{ RCUs} and 120 WCUs120\text{ WCUs}Answer
  2. B
    180 RCUs180\text{ RCUs} and 120 WCUs120\text{ WCUs}
  3. C
    38 RCUs38\text{ RCUs} and 120 WCUs120\text{ WCUs}
  4. D
    75 RCUs75\text{ RCUs} and 108 WCUs108\text{ WCUs}

Answer

The correct answer is 75 RCUs75\text{ RCUs} and 120 WCUs120\text{ WCUs}.
The correct answer is 75 RCUs75\text{ RCUs} and 120 WCUs120\text{ WCUs}. Each write payload of 2.7 KB2.7\text{ KB} is rounded up to 3 KB3\text{ KB}. Writing 4040 items per second requires 40×3=120 WCUs40 \times 3 = 120\text{ WCUs}. For reads, a single Query returns 1212 items of 1.5 KB1.5\text{ KB} each, totaling 18 KB18\text{ KB} of data. This cumulative size is rounded up to the nearest 4 KB4\text{ KB} boundary, which is 20 KB20\text{ KB}. Since strongly consistent reads require 1 RCU1\text{ RCU} per 4 KB4\text{ KB} block, each Query consumes 20 KB/4 KB=5 RCUs20\text{ KB} / 4\text{ KB} = 5\text{ RCUs}. Executing 1515 queries per second requires 15×5=75 RCUs15 \times 5 = 75\text{ RCUs}.

Step-by-Step Solution

1
Calculate the Write Capacity Units (WCUs) needed per second.
Each write payload of 2.7 KB2.7\text{ KB} is rounded up to the nearest 1 KB1\text{ KB} boundary, which is 3 KB3\text{ KB}. Since the application performs 4040 writes per second, the total write capacity required is 40×3 KB=120 WCUs40 \times 3\text{ KB} = 120\text{ WCUs}.
One WCU supports one write per second for items up to 1 KB1\text{ KB}.
2
Calculate the cumulative size of retrieved items per `Query` operation.
Each `Query` returns 1212 items with an average size of 1.5 KB1.5\text{ KB} each. The cumulative size is 12×1.5 KB=18 KB12 \times 1.5\text{ KB} = 18\text{ KB}.
For Query and Scan operations, DynamoDB calculates read capacity based on the cumulative size of all items returned rather than rounding up each item individually.
3
Round up the cumulative query size and calculate the RCUs per Query.
The cumulative size of 18 KB18\text{ KB} is rounded up to the nearest 4 KB4\text{ KB} boundary, which is 20 KB20\text{ KB}. For a strongly consistent read, each 4 KB4\text{ KB} requires 1 RCU1\text{ RCU}, so each query consumes 20 KB/4 KB=5 RCUs20\text{ KB} / 4\text{ KB} = 5\text{ RCUs}.
Read capacity for strongly consistent reads is calculated by dividing the rounded cumulative size in KB by 4 KB4\text{ KB}.
4
Calculate the total Read Capacity Units (RCUs) needed per second.
The application performs 1515 queries per second. The total read capacity required is 15×5 RCUs=75 RCUs15 \times 5\text{ RCUs} = 75\text{ RCUs}.
Multiplying the RCUs consumed per query by the number of queries per second gives the total provisioned read throughput.

Key Concept

Calculation of DynamoDB Read and Write Capacity Units (RCUs and WCUs) for Batch/Query Operations
Rate this question