SHA256
moved structure around
This commit is contained in:
1 parent
3fc5b6ad66
commit
3e92763636
2 files changed
No files matched your search
@@ -0,0 +1,67 @@
|
||||
# Practice Exam 3 Mistakes
|
||||
|
||||
---
|
||||
#### A Developer is creating a DynamoDB table for storing application logs. The table has 5 write capacity units (WCUs). The Developer needs to configure the read capacity units (RCUs) for the table. Which of the following configurations represents the most efficient use of throughput?
|
||||
|
||||
- Eventually consistent reads of 5 RCUs reading items that are 4 KB in size
|
||||
x Strongly consistent reads of 5 RCUs reading items that are 4 KB in size
|
||||
- Eventually consistent reads of 15 RCUs reading items that are 1 KB in size
|
||||
- Strongly consistent reads of 15 RCUs reading items that are 1KB in size
|
||||
|
||||
> [!note] Correct Answer
|
||||
>Eventually consistent reads of 15 RCUs reading items that are 1 KB in size
|
||||
|
||||
> [!caution] Explanation
|
||||
> Among these options, the most cost-efficient in terms of maximizing the number of read operations per RCU is:
|
||||
> **Eventually consistent reads of 15 RCUs reading items that are 1 KB in size.**
|
||||
>
|
||||
> This choice utilizes the RCU allocation most effectively because:
|
||||
> - It leverages the lower RCU consumption of eventually consistent reads.
|
||||
> - It takes advantage of the smaller item size (1 KB), which requires fewer RCUs for the same number of operations compared to items up to 4 KB.
|
||||
---
|
||||
#### A developer is creating an AWS Serverless Application Model (AWS SAM) template. It includes several AWS Lambda functions, an Amazon S3 bucket, and an Amazon CloudFront distribution. One Lambda function, running on Lambda@Edge, is integrated with the CloudFront distribution, while the S3 bucket serves as an origin for the distribution.However, upon deploying the AWS SAM blueprint in the us-west-1 Region, the stack's creation fails.What could be the possible reason for this failure?
|
||||
- Lambda@Edge functions can only be deployed in the us-east-1 Region.
|
||||
- AWS SAM templates are not supported in the us-west-1 Region.
|
||||
- Amazon S3 buckets serving as origins for CloudFront must be created in a separate Region from the CloudFront distribution.
|
||||
x AWS Lambda functions integrated with CloudFront cannot be deployed using AWS SAM templates.
|
||||
|
||||
> [!note] Correct Answer
|
||||
> Lambda@Edge functions can only be deployed in the us-east-1 Region
|
||||
|
||||
> [!caution] Explanation
|
||||
> Lambda@Edge functions can only be created in the us-east-1 Region. If you want to deploy such functions, they must be done in this specific region.
|
||||
---
|
||||
#### A Developer has added a Global Secondary Index (GSI) to an existing Amazon DynamoDB table. The GSI is used mainly for read operations whereas the primary table is extremely write-intensive. Recently, the Developer has noticed throttling occurring under heavy write activity on the primary table. However, the write capacity units on the primary table are not fully utilized.What is the best explanation for why the writes are being throttled on the primary table?
|
||||
|
||||
|
||||
|
||||
There are insufficient read capacity units on the primary table
|
||||
|
||||
|
||||
|
||||
The Developer should have added an LSI instead of a GSI
|
||||
|
||||
|
||||
|
||||
There are insufficient write capacity units on the primary table
|
||||
|
||||
|
||||
|
||||
The write capacity units on the GSI are under provisioned
|
||||
|
||||
Correct answer
|
||||
|
||||
The write capacity units on the GSI are under provisioned
|
||||
|
||||
Feedback
|
||||
|
||||
**Explanation:**
|
||||
|
||||
Some applications might need to perform many kinds of queries, using a variety of different attributes as query criteria. To support these requirements, you can create one or more global secondary indexes and issue Query requests against these indexes in Amazon DynamoDB.
|
||||
|
||||
When items from a primary table are written to the GSI they consume write capacity units. It is essential to ensure the GSI has sufficient WCUs (typically, at least as many as the primary table). If writes are throttled on the GSI, the main table will be throttled (even if there’s enough WCUs on the main table). LSIs do not cause any special throttling considerations.
|
||||
|
||||
In this scenario, it is likely that the Developer assumed that the GSI would need fewer WCUs as it is more read-intensive and neglected to factor in the WCUs required for writing data into the GSI. Therefore, the most likely explanation is that the write capacity units on the GSI are under provisioned
|
||||
|
||||
---
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
# DynamoDB Read/Write Units — Numeric Practice, Set 3
|
||||
|
||||
20 questions. Give a numeric answer for each, using `1 = <number>`, `2 = <number>`, and so on.
|
||||
|
||||
## Assumptions
|
||||
|
||||
- Assume provisioned capacity and steady workloads.
|
||||
- All item sizes are exact DynamoDB item sizes, including attribute names and values.
|
||||
- Each read accesses an individual item, not a Query or Scan. Transactional operations count individual items, not transaction API calls.
|
||||
- Normal writes are non-transactional. All writes create new items.
|
||||
- Ignore indexes, replication, retries, failed requests, burst capacity and partition limits.
|
||||
- Questions 1–14 ask for exact throughput requirements: fractional RCU answers are valid; do not round the final result to a whole number.
|
||||
- Questions 15–18 ask for the maximum number of individual item operations per second.
|
||||
- Questions 19–20 ask for whole-number provisioned capacity settings.
|
||||
|
||||
## Questions
|
||||
### 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.
|
||||
$2KB \times 6Hz = 12WCU$
|
||||
|
||||
Answer: 12 WCUs
|
||||
|
||||
### 2. You normally write nine separate 0.7 KB items every second. How many WCUs are required?
|
||||
$1KB \times 9Hz = 9WCU$
|
||||
|
||||
Answer: 9 WCUs
|
||||
|
||||
### 3. You normally write four separate 3.01 KB items every second. How many WCUs are required?
|
||||
$4KB \times 4Hz = 16WCU$
|
||||
|
||||
Answer: 16 WCUs
|
||||
|
||||
### 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: 18WCUs
|
||||
|
||||
### 5. You transactionally write six separate 1 KB items every second. How many WCUs are required?
|
||||
$1KB \times 6Hz \times 2(transaction) = 12WCU$
|
||||
|
||||
Answer: 12WCUs
|
||||
|
||||
### 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: 10RCUs
|
||||
|
||||
### 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: 9RCUs
|
||||
|
||||
### 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: 4.5RCUs
|
||||
|
||||
### 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: 7.5RCUs
|
||||
|
||||
### 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: 7RCUs
|
||||
|
||||
### 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: 20RCUs
|
||||
|
||||
### 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: 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?
|
||||
$ceil(0.6KB/1KB) \times 2Hz + ceil(2.4KB/1KB) \times 3Hz$
|
||||
$= 1 \times 2Hz + 3 \times 3Hz = 11WCU$
|
||||
|
||||
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?
|
||||
$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: 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?
|
||||
$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: 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?
|
||||
$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: 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?
|
||||
$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: 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?
|
||||
$floor(32RCU/ceil(5KB/4KB)/2(transaction))$
|
||||
$=floor(32/2/2)$
|
||||
$=32 / 4$
|
||||
$= 8Hz$
|
||||
|
||||
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?
|
||||
$ceil(3KB/4KB) \times 11Hz \times 0.5(eventual)$
|
||||
$= 1 \times 11 \times 0.5 = 5.5RCU$
|
||||
|
||||
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?
|
||||
$ceil(12.01KB/4KB) \times 5Hz \times 0.5(eventual)$
|
||||
$= 4 \times 2.5$
|
||||
$=10 RCU$
|
||||
|
||||
Answer: 10 RCU
|
||||
|
||||
Reference in new issue
Block a user