INFRASTRUCTURE LEARNINGINFRASTRUCTURE LEARNING
インフラ大全インフラ大全IT INFRASTRUCTURE / LEARNING
Infrastructure learning guide
Find a lesson or lab/

Esc to close · Search terms stay on your device

LEARNING日本語

Topic lessonTopic: DynamoDB key design and workload skew

Investigate hot keys in DynamoDB|Compare volume and skew

The same request count can create different local pressure. Compare synthetic tenant distributions and the cost of reading data back after sharding.

What you will learn

Compare synthetic tenant distributions and the cost of reading data back after sharding.

Prerequisite

This exercise uses fictional evidence and makes no changes in a live environment.

Compare distributions at equal total load

Traffic concentrated on partition keys can increase local pressure. Splitting a key affects how applications read from the result.

From observed skew to design options
From observed skew to design options1: Total — Fix the window — Distribution. 2: Distribution — Identify concentration — Candidate. 3: Candidate — Include read cost — Verify123TotalDistributionCandidateVerifyFrom observed skew to design options1: Total — Fix the window — Distribution. 2: Distribution — Identify concentration — Candidate. 3: Candidate — Include read cost — Verify123TotalDistributionCandidateVerify
  1. Total → DistributionFix the window
  2. Distribution → CandidateIdentify concentration
  3. Candidate → VerifyInclude read cost
Total
Match the measurement window
Distribution
Compare tenant traffic
Candidate
Spread writes across keys
Verify
Measure reads and writes again

1,000 synthetic writes in two distributions

The counts illustrate concentration and give no throughput guarantees.
ScenarioDistributionWhat to inspect
Typical100 each across 10 tenantsControl distribution
Concentrated900 for one tenant, 100 elsewhereInspect the most frequent key
SplitDistribute across four synthetic shardsMeasure each shard
History readMerge up to four shard responsesVerify order and pagination

A split may require reading and merging several shards for a tenant history.

Evidence for the decision

Read the distribution Match the design's key to the granularity of the observed distribution.

Account for reads Verify shard selection, ordering, continuation and extra requests after splitting.

Verify actual pressure Check throttling reasons and resource scope to test whether skew explains the symptom.

Check your decision

Choose an option to see the result and explanation.

Does equal total traffic mean equal load everywhere?
Read the answer and reason

Answer: Compare distribution and actual throttle reasons · Traffic can concentrate locally.

What changes when a key is split into four shards?
Read the answer and reason

Answer: Query targets, result merge and ordering · Reads may need to visit and combine multiple results.

How do you compare two designs?
Read the answer and reason

Answer: Use the same window and input key distribution · Control the inputs and functionality.

Check, then explain in your own words

  1. Measure distribution and causes.
  2. Define the candidate and read contract.
  3. Verify under comparable load.
Check your understanding: Should you always split keys when demand peaks?

Inspect the actual limit and quantify read impact first.

A split can introduce another operating cost.

Sources and conditions checked

The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.