DynamoDB Capacity Modes Interview Questions

Master Amazon DynamoDB Capacity Modes with interview-focused questions covering RCU, WCU, Provisioned Capacity, On-Demand Capacity, Auto Scaling, Adaptive Capacity, Burst Capacity, Throttling, Hot Partitions, CloudWatch Monitoring, and production best practices.

Introduction

One of the biggest advantages of Amazon DynamoDB is its ability to automatically scale to handle millions of requests.

To achieve this, DynamoDB offers two capacity modes:

  • Provisioned Capacity
  • On-Demand Capacity

Understanding capacity planning is critical because it directly impacts:

  • Performance
  • Cost
  • Scalability
  • Availability
  • Application Latency

This topic is frequently asked in AWS Developer, AWS Solutions Architect, Senior Java Developer, and Cloud Engineer interviews.


DynamoDB Capacity Architecture

flowchart LR

Application --> CapacityMode

CapacityMode --> Provisioned

CapacityMode --> OnDemand

Provisioned --> RCU

Provisioned --> WCU

OnDemand --> AutomaticScaling

1. What are Capacity Modes in DynamoDB?

Answer

Capacity Modes determine how DynamoDB handles read and write throughput.

Two options are available:

  • Provisioned Capacity
  • On-Demand Capacity

2. What is Provisioned Capacity?

Provisioned Capacity allows you to define the required throughput in advance.

You specify

  • Read Capacity Units (RCU)
  • Write Capacity Units (WCU)

3. What is On-Demand Capacity?

On-Demand Capacity automatically adjusts capacity based on incoming traffic.

No capacity planning is required.

Benefits

  • Serverless
  • Automatic Scaling
  • Pay Per Request

Capacity Modes

flowchart LR

Provisioned --> ManualCapacity

Provisioned --> AutoScaling

OnDemand --> AutomaticCapacity

4. What is a Read Capacity Unit (RCU)?

One RCU supports

  • One strongly consistent read per second for an item up to 4 KB
  • Two eventually consistent reads per second for an item up to 4 KB

5. What is a Write Capacity Unit (WCU)?

One WCU supports

  • One write per second for an item up to 1 KB

6. How are RCUs calculated?

Formula

Item Size

÷

4 KB

×

Read Requests

Example

8 KB item

2 RCUs for strongly consistent read


7. How are WCUs calculated?

Formula

Item Size

÷

1 KB

×

Write Requests

Example

3 KB item

3 WCUs


8. Difference between Provisioned and On-Demand?

Provisioned On-Demand
Predefined Capacity Automatic Capacity
Lower Cost for Predictable Traffic Best for Unpredictable Traffic
Capacity Planning Required No Planning Required
Auto Scaling Optional Built-In Scaling

9. When should Provisioned Capacity be used?

Best for

  • Stable Workloads
  • Predictable Traffic
  • Enterprise Applications
  • Lower Cost

10. When should On-Demand be used?

Best for

  • Unknown Traffic
  • New Applications
  • Event-Based Systems
  • Seasonal Workloads

11. What is Auto Scaling?

Auto Scaling automatically increases or decreases Provisioned Capacity based on utilization.

Benefits

  • Reduced Cost
  • Better Performance
  • Automatic Adjustment

Auto Scaling

flowchart LR

CloudWatch --> AutoScaling --> IncreaseCapacity

AutoScaling --> DecreaseCapacity

12. What is Burst Capacity?

Unused Provisioned Capacity is temporarily stored.

Later

Used during sudden traffic spikes.


13. What is Adaptive Capacity?

Adaptive Capacity automatically redistributes throughput to heavily used partitions.

Benefits

  • Handles uneven workloads
  • Reduces Hot Partition impact

Adaptive Capacity

flowchart LR

HotPartition --> AdaptiveCapacity --> ExtraCapacity

14. What is Throttling?

Throttling occurs when requests exceed available capacity.

Example

Provisioned

100 WCU

Application sends

250 Writes

Result

ProvisionedThroughputExceededException

15. What causes Throttling?

  • Insufficient RCUs
  • Insufficient WCUs
  • Hot Partitions
  • Traffic Spikes

16. How do you resolve Throttling?

  • Increase Capacity
  • Enable Auto Scaling
  • Use On-Demand Mode
  • Improve Partition Key
  • Retry with Exponential Backoff

17. What is Exponential Backoff?

Retry strategy that waits progressively longer after failures.

Example

100 ms

↓

200 ms

↓

400 ms

↓

800 ms

18. What is a Hot Partition?

One partition receives excessive requests.

Symptoms

  • High Latency
  • Throttling
  • Uneven Capacity Usage

Hot Partition

flowchart LR

MillionsOfRequests --> SinglePartition --> Throttling

19. How do you avoid Hot Partitions?

  • High Cardinality Partition Keys
  • Randomized Keys
  • Bucketing
  • Better Access Patterns

20. What is Capacity Planning?

Capacity Planning estimates future RCU and WCU requirements.

Monitor

  • Traffic
  • Growth
  • Peak Hours
  • Seasonal Events

21. How do you monitor DynamoDB capacity?

CloudWatch Metrics

  • ConsumedReadCapacityUnits
  • ConsumedWriteCapacityUnits
  • ThrottledRequests
  • SuccessfulRequests
  • SystemErrors
  • UserErrors

CloudWatch Monitoring

flowchart LR

DynamoDB --> CloudWatch --> Dashboard --> Alerts

22. Which CloudWatch metrics are important?

  • Read Capacity
  • Write Capacity
  • Throttled Requests
  • Latency
  • System Errors
  • User Errors

23. Can Capacity Mode be changed?

Yes.

You can switch between

  • Provisioned
  • On-Demand

without recreating the table.


24. Does every GSI have separate capacity?

Yes.

Each Global Secondary Index has its own

  • RCU
  • WCU

25. Does LSI have separate capacity?

No.

LSI shares the table's throughput.


26. Banking Example

Traffic

Stable

Recommendation

Provisioned Capacity

+

Auto Scaling

Benefits

  • Lower Cost
  • Predictable Performance

27. E-Commerce Example

Traffic

Normal

Black Friday

10× Traffic

Recommendation

On-Demand

or

Provisioned + Auto Scaling


28. Gaming Example

Millions of unpredictable requests.

Recommendation

On-Demand Capacity

29. IoT Example

Continuous sensor data.

Recommendation

Provisioned Capacity

+

Auto Scaling

30. Cost Optimization Tips

  • Prefer Provisioned for predictable workloads.
  • Use On-Demand for unpredictable workloads.
  • Enable Auto Scaling.
  • Monitor CloudWatch.
  • Remove unused GSIs.
  • Reduce item size.
  • Optimize access patterns.
  • Use DAX for read-heavy workloads.

Enterprise Best Practices

  • Enable Auto Scaling for Provisioned tables.
  • Use On-Demand for unpredictable traffic.
  • Design good partition keys.
  • Monitor throttling continuously.
  • Enable CloudWatch alarms.
  • Use exponential backoff for retries.
  • Avoid hot partitions.
  • Review capacity monthly.
  • Optimize GSI usage.
  • Test workloads before production.

Quick Revision

Topic Key Point
Capacity Modes Provisioned / On-Demand
RCU Read Capacity Unit
WCU Write Capacity Unit
Auto Scaling Automatic Provisioned Scaling
Burst Capacity Temporary Extra Capacity
Adaptive Capacity Handles Hot Partitions
Throttling Capacity Exceeded
Monitoring CloudWatch
Retry Strategy Exponential Backoff
Best for Stable Traffic Provisioned
Best for Variable Traffic On-Demand

Interview Tips

Interviewers frequently ask

  • Difference between Provisioned and On-Demand.
  • Explain RCU and WCU.
  • How do you calculate RCUs?
  • What causes throttling?
  • Explain Adaptive Capacity.
  • What is Burst Capacity?
  • How do you avoid Hot Partitions?
  • Which capacity mode would you choose for Black Friday?
  • How do you monitor DynamoDB capacity?
  • Explain Auto Scaling.

Always explain the trade-offs between performance, scalability, and cost, and support your answers with real production scenarios.


Summary

DynamoDB Capacity Modes allow applications to balance performance and cost based on workload characteristics. Provisioned Capacity is ideal for predictable workloads with steady traffic, while On-Demand Capacity automatically scales for unpredictable traffic patterns. Features such as Auto Scaling, Adaptive Capacity, Burst Capacity, and CloudWatch monitoring help ensure applications remain responsive under varying load conditions.

Understanding RCUs, WCUs, throttling, capacity planning, and production tuning is essential for building scalable, cost-effective DynamoDB applications and succeeding in AWS, backend engineering, and cloud architecture interviews.