피드로 돌아가기
Dev.toDatabase
원문 읽기
월 $17 비용으로 $854 규모의 Provisioned Capacity 낭비 제거
DynamoDB Contributor Insights Pricing: What You're Actually Paying For
AI 요약
Context
DynamoDB의 Partition Key Skew 발생 시 특정 파티션에 트래픽이 집중되어 Throttling이 발생함. 전체 Throughput을 높여도 Hot Key 문제는 해결되지 않아 유휴 파티션으로 인한 비용 낭비가 심화되는 구조적 한계 존재.
Technical Solution
- Code-level Instrumentation 없는 CloudWatch 기반의 Near real-time 트래픽 분석으로 Hot Key 식별
- Rule 기반 과금 체계($0.50/rule)와 Event 기반 과금($0.03/1M events)의 조합으로 모니터링 비용 최적화
- Throttle-only mode 도입을 통해 정상 상태에서는 Rule 비용만 지불하고 Throttling 발생 시에만 Event 비용을 청구하는 효율적 감시 체계 구축
- 2 + (2 × GSI 수) 공식에 따른 Rule 자동 생성 구조를 통한 Table 및 GSI 전체의 트래픽 분포 가시성 확보
- Hot Key 식별 후 Partition Key Schema 재설계와 Provisioned Capacity 최적화를 거쳐 Reserved Capacity를 적용하는 단계적 비용 절감 전략 수립
실천 포인트
- High-volume Table(1B+ events/month)은 비용 최적화를 위해 Throttle-only mode 우선 검토 - Reserved Capacity 약정 전 반드시 Contributor Insights로 Hot Key 존재 여부 확인 - Low-cardinality Key(Region, Status 등) 사용 시 Partition Key Skew 가능성을 설계 단계에서 검증 - IAM Role에 cloudwatch:EnableInsightRules, cloudwatch:PutInsightRule, dynamodb:DescribeTable 권한 포함 여부 확인