This commit is contained in:
Duch Bot committed 2026-11-02 15:39:36 +00:00
1 parent 8eeb419ba4
commit c05aa606e0
1 file changed
+69 -52
@@ -14,115 +14,132 @@
- Questions 19–20 ask for whole-number provisioned capacity settings. - Questions 19–20 ask for whole-number provisioned capacity settings.
## Questions ## Questions
### 1. You normally write six separate 1.8 KB items every second. How many WCUs are required? ### 1. You normally write six separate 1.8 KB items every second. How many WCUs are required?
Writing to DynamoDB splits writes into 1KB blocks.
$1KB \times 6Hz = 12WCU$
Answer: ______ Answer: 12 WCUs
### 2. You normally write nine separate 0.7 KB items every second. How many WCUs are required? ### 2. You normally write nine separate 0.7 KB items every second. How many WCUs are required?
$1KB \times 9Hz = 9WCU$
Answer: ______ Answer: 9 WCUs
### 3. You normally write four separate 3.01 KB items every second. How many WCUs are required? ### 3. You normally write four separate 3.01 KB items every second. How many WCUs are required?
$4KB \times 4Hz = 16WCU$
Answer: ______ Answer: 16 WCUs
### 4. You transactionally write three separate 2.01 KB items every second. How many WCUs are required? ### 4. You transactionally write three separate 2.01 KB items every second. How many WCUs are required?
Transactional writes have $\times 2$ multiplier.
$3KB \times 3Hz \times 2 (transaction) = 18WCU$
Answer: ______ Answer: 18WCUs
### 5. You transactionally write six separate 1 KB items every second. How many WCUs are required? ### 5. You transactionally write six separate 1 KB items every second. How many WCUs are required?
$1KB \times 6Hz \times 2(transaction) = 12WCU$
Answer: ______ Answer: 12WCUs
### 6. You perform strongly consistent reads of five separate 5 KB items every second. How many RCUs of throughput are required? ### 6. You perform strongly consistent reads of five separate 5 KB items every second. How many RCUs of throughput are required?
Reading from DynamoDB splits reads into 4KB blocks.
$ceil(5KB/4KB) \times 5Hz = 2 \times 5Hz = 10RCU$
Answer: ______ Answer: 10RCUs
### 7. You perform strongly consistent reads of three separate 12 KB items every second. How many RCUs of throughput are required? ### 7. You perform strongly consistent reads of three separate 12 KB items every second. How many RCUs of throughput are required?
$ceil(12KB/4KB) \times 3Hz = 3 \times 3Hz = 9RCU$
Answer: ______ Answer: 9RCUs
### 8. You perform eventually consistent reads of nine separate 0.8 KB items every second. How many RCUs of throughput are required? ### 8. You perform eventually consistent reads of nine separate 0.8 KB items every second. How many RCUs of throughput are required?
Eventually consistent reads have $\times 0.5$ multiplier.
$ceil(1KB/4KB) \times 9Hz \times 0.5(eventual) = 1 \times 9Hz \times 0.5 = 4.5RCU$
Answer: ______ Answer: 4.5RCUs
### 9. You perform eventually consistent reads of five separate 8.01 KB items every second. How many RCUs of throughput are required? ### 9. You perform eventually consistent reads of five separate 8.01 KB items every second. How many RCUs of throughput are required?
$ceil(8.01KB/4KB) \times 5Hz \times 0.5(eventual)$
$= 3 \times 5Hz \times 0.5$
$= 15 \times 0.5$
$\therefore\ = 7.5 RCU$
Answer: ______ Answer: 7.5RCUs
### 10. You perform eventually consistent reads of seven separate 8 KB items every second. How many RCUs of throughput are required? ### 10. You perform eventually consistent reads of seven separate 8 KB items every second. How many RCUs of throughput are required?
$ceil(8KB/4KB) \times 7Hz \times 0.5(eventual) = 2 \times 7Hz \times 0.5 = 7RCU$
Answer: ______ Answer: 7RCUs
### 11. You transactionally read five separate 4.01 KB items every second. How many RCUs of throughput are required? ### 11. You transactionally read five separate 4.01 KB items every second. How many RCUs of throughput are required?
Transactional reads have $\times 2$ multiplier.
$ceil(4.01KB/4KB) \times 5Hz \times 2(transaction) = 2 \times 5Hz \times 2 = 20 RCU$
Answer: ______ Answer: 20RCUs
### 12. You transactionally read three separate 11 KB items every second. How many RCUs of throughput are required? ### 12. You transactionally read three separate 11 KB items every second. How many RCUs of throughput are required?
$ceil(11KB/4KB) \times 3Hz \times 2(transaction) =$
$=3 \times 3Hz \times 2$
$=18 RCU$
Answer: ______ Answer: 18RCUs
### 13. Each second, you normally write two 0.6 KB items and three 2.4 KB items to the same table. How many WCUs are required in total? ### 13. Each second, you normally write two 0.6 KB items and three 2.4 KB items to the same table. How many WCUs are required in total?
$ceil(0.6KB/1KB) \times 2Hz + ceil(2.4KB/1KB) \times 3Hz$
$= 1 \times 2Hz + 3 \times 3Hz = 11WCU$
Answer: ______ Answer: 11WCUs
### 14. Each second, you perform strongly consistent reads of two 5 KB items and eventually consistent reads of three 1 KB items from the same table. How many RCUs of throughput are required in total? ### 14. Each second, you perform strongly consistent reads of two 5 KB items and eventually consistent reads of three 1 KB items from the same table. How many RCUs of throughput are required in total?
$ceil(5KB/4KB) \times 2Hz + ceil(1KB/4KB) \times 3Hz \times 0.5(eventual)$
$= 2 \times 2 + 1 \times 3 \times 0.5 = 4 + 1.5 = 5.5 RCU$
Answer: ______ Answer: 5.5RCU
### 15. You have 28 WCUs available. What is the maximum number of normal item writes per second you can sustain if each item is 3.2 KB? ### 15. You have 28 WCUs available. What is the maximum number of normal item writes per second you can sustain if each item is 3.2 KB?
$floor(28 WCU / ceil(3.2KB/1KB))$
$= floor(28 WCU / 4 WCU) = 7Hz$
$\therefore$ 7 writes a second of 3.2KB items (up to 4KB @ 7Hz).
Answer: ______ Answer: 7 writes a second.
### 16. You have 30 WCUs available. What is the maximum number of transactional item writes per second you can sustain if each item is 2.2 KB? ### 16. You have 30 WCUs available. What is the maximum number of transactional item writes per second you can sustain if each item is 2.2 KB?
$floor(30WCU/ceil(2.2KB/1KB)/2(transaction))$
$=30WCU/3/2$
$=30WCU/6$
$=5Hz$
$\therefore$ 5 writes a second of 2.2KB items (up to 3KB @ 5Hz).
Answer: ______ Answer: 5 writes a second.
### 17. You have 15 RCUs available. What is the maximum number of eventually consistent item reads per second you can sustain if each item is 9 KB? ### 17. You have 15 RCUs available. What is the maximum number of eventually consistent item reads per second you can sustain if each item is 9 KB?
$floor(15RCU/ceil(9KB/4KB)/0.5(eventual))$
$=floor(15RCU/3/0.5)$
$=floor(5/0.5)$
$=floor(10)$
$=10Hz$
$\therefore$ 10 reads a second of 9KB items (up to 12KB @ 10Hz).
Answer: ______ Answer: 10 reads a second
### 18. You have 32 RCUs available. What is the maximum number of transactional item reads per second you can sustain if each item is 5 KB? ### 18. You have 32 RCUs available. What is the maximum number of transactional item reads per second you can sustain if each item is 5 KB?
$floor(32RCU/ceil(5KB/4KB)/2(transaction))$
$=floor(32/2/2)$
$=32 / 4$
$= 8Hz$
Answer: ______ Answer: 8 reads a second
### 19. You perform eventually consistent reads of eleven separate 3 KB items every second. What is the minimum WHOLE NUMBER of RCUs you must provision? ### 19. You perform eventually consistent reads of eleven separate 3 KB items every second. What is the minimum WHOLE NUMBER of RCUs you must provision?
$ceil(3KB/4KB) \times 11Hz \times 0.5(eventual)$
$= 1 \times 11 \times 0.5 = 5.5RCU$
Answer: ______ Answer: 6 RCUs
### 20. You perform eventually consistent reads of five separate 12.01 KB items every second. What is the minimum WHOLE NUMBER of RCUs you must provision? ### 20. You perform eventually consistent reads of five separate 12.01 KB items every second. What is the minimum WHOLE NUMBER of RCUs you must provision?
$ceil(12.01KB/4KB) \times 5Hz \times 0.5(eventual)$
$= 4 \times 2.5$
$=10 RCU$
Answer: ______ Answer: 10 RCU
## Answer key
<details>
<summary>Show answers and calculations</summary>
`ceil` means round up to the next whole number. Sizes are divided by the 1 KB write or 4 KB read increment before rounding.
1. **12 WCUs** — `ceil(1.8 / 1) × 6 = 2 × 6`.
2. **9 WCUs** — `ceil(0.7 / 1) × 9 = 1 × 9`.
3. **16 WCUs** — `ceil(3.01 / 1) × 4 = 4 × 4`.
4. **18 WCUs** — `ceil(2.01 / 1) × 3 × 2 = 3 × 3 × 2`.
5. **12 WCUs** — `ceil(1 / 1) × 6 × 2 = 1 × 6 × 2`.
6. **10 RCUs** — `ceil(5 / 4) × 5 = 2 × 5`.
7. **9 RCUs** — `ceil(12 / 4) × 3 = 3 × 3`.
8. **4.5 RCUs** — `ceil(0.8 / 4) × 9 × 0.5 = 1 × 9 × 0.5`.
9. **7.5 RCUs** — `ceil(8.01 / 4) × 5 × 0.5 = 3 × 5 × 0.5`.
10. **7 RCUs** — `ceil(8 / 4) × 7 × 0.5 = 2 × 7 × 0.5`.
11. **20 RCUs** — `ceil(4.01 / 4) × 5 × 2 = 2 × 5 × 2`.
12. **18 RCUs** — `ceil(11 / 4) × 3 × 2 = 3 × 3 × 2`.
13. **11 WCUs** — `(ceil(0.6 / 1) × 2) + (ceil(2.4 / 1) × 3) = 2 + 9`.
14. **5.5 RCUs** — `(ceil(5 / 4) × 2) + (ceil(1 / 4) × 3 × 0.5) = 4 + 1.5`.
15. **7 writes/s** — `28 / ceil(3.2 / 1) = 28 / 4`.
16. **5 transactional item writes/s** — `30 / (ceil(2.2 / 1) × 2) = 30 / 6`.
17. **10 reads/s** — `15 / (ceil(9 / 4) × 0.5) = 15 / 1.5`.
18. **8 transactional item reads/s** — `32 / (ceil(5 / 4) × 2) = 32 / 4`.
19. **6 provisioned RCUs** — `ceil(ceil(3 / 4) × 11 × 0.5) = ceil(5.5)`.
20. **10 provisioned RCUs** — `ceil(ceil(12.01 / 4) × 5 × 0.5) = ceil(10)`.
For questions 1–14, RCUs describe exact throughput requirements. Provisioned settings must be whole numbers, as explicitly requested in questions 19–20.
</details>