Hot partition/key: một phân vùng (hoặc một key) nhận lượng traffic không cân xứng so với các phân vùng khác, vượt giới hạn throughput của node giữ nó → throttle/timeout dù tổng cluster còn dư tải.
Nguyên nhân:
- Partition key nghiêng: chọn key low-cardinality (vd country, status) → vài giá trị nuốt hết.
- Hot entity: một celebrity/viral post, một sản phẩm flash-sale → đọc/ghi dồn vào một key.
- Monotonic key: dùng timestamp/auto-increment làm key → mọi write mới rơi vào cùng một partition cuối.
Cách giảm nhẹ:
- Key salting / sharding key nóng: thêm hậu tố ngẫu nhiên key#1..N, fan-out ghi, gộp khi đọc — đánh đổi độ phức tạp đọc.
- Chọn partition key high-cardinality + đều (composite key) ngay từ đầu.
- Cache trước DB cho hot read (CDN/Redis) để chặn đa số request.
- Write-combining / counter phân tán cho hot write (đếm like).
- Shuffle sharding để cô lập tải gây hại.
Lưu ý: phát hiện bằng metric per-partition (CloudWatch ConsumedThroughput). Đừng chỉ tăng tổng capacity — node nóng vẫn nghẽn vì giới hạn là per-partition.
Hot partition/key: one partition (or key) receives disproportionate traffic versus others, exceeding the throughput limit of the node holding it → throttling/timeouts even though the cluster overall has spare capacity.
Causes:
- Skewed partition key: a low-cardinality key (e.g. country, status) → a few values absorb everything.
- Hot entity: a celebrity/viral post, a flash-sale product → reads/writes pile onto one key.
- Monotonic key: timestamp/auto-increment as key → every new write lands on the same last partition.
Mitigations:
- Key salting / sharding the hot key: add a random suffix key#1..N, fan out writes, merge on read — trades read complexity.
- Pick a high-cardinality, evenly-distributed partition key (composite) up front.
- Cache in front of the DB for hot reads (CDN/Redis) to absorb most requests.
- Write-combining / distributed counters for hot writes (like counts).
- Shuffle sharding to isolate harmful load.
Note: detect with per-partition metrics (CloudWatch ConsumedThroughput). Don't just raise total capacity — the hot node still chokes because the limit is per-partition.