CloudGuild · Blog · Cheat sheets · Lessons · Certifications
Amazon DynamoDB — NoSQL at Scale: When to Use What (and How the Exam Tests It)
Explore when to choose Amazon DynamoDB for your architecture and how the SAA-C03 exam tests your understanding of this NoSQL database.
DynamoDB is a fully managed NoSQL database service. It delivers predictable low latency. You can choose between on-demand or provisioned capacity. There are no servers to manage, making it ideal for many use cases.
When to Choose DynamoDB
DynamoDB shines in specific scenarios. Here are key moments to reach for it:
- High-Scale, Simple Access Patterns: If your application involves sessions, shopping carts, leaderboards, IoT data, or user profiles, DynamoDB is a strong candidate. These use cases often require quick reads and writes without complex queries.
- Serverless Stacks: When a relational database engine is overkill, DynamoDB fits well in serverless architectures. It scales automatically, allowing you to focus on building your application without worrying about database management.
Comparison Table: DynamoDB vs. Relational Databases
| Feature | DynamoDB | Relational Databases |
|---|---|---|
| Access Patterns | Simple, predictable | Complex, normalized tables |
| Scalability | High, automatic | Limited, requires planning |
| Latency | Single-digit milliseconds | Variable, can be higher |
| Management | Fully managed | Requires server management |
Key Architectural Decisions
When designing with DynamoDB, make these critical choices:
- Model Around Access Patterns: Focus on how your application will access data. Choose partition keys that spread the load evenly across your table. This prevents throttling due to hot partitions.
- Capacity Mode: Use on-demand mode for spiky or unpredictable traffic. Opt for provisioned capacity with auto-scaling for steady, predictable loads. This helps control costs while ensuring performance.
- Enhancements: Consider using DynamoDB Accelerator (DAX) for microsecond reads on frequently accessed items. Use Streams for real-time data processing and change-driven applications. For multi-region applications, Global Tables allow for active-active setups.
Gotchas & Exam Traps
Prepare for common pitfalls:
- Hot Partitions: If your partition key design leads to uneven distribution, you will face throttling. Always design your keys to avoid this issue.
- DynamoDB vs. Relational Options: The exam may present scenarios where single-digit milliseconds performance at massive scale indicates DynamoDB. If the scenario involves complex joins, a relational database is the better choice.
- Caching Differences: Remember that DAX specifically caches data from DynamoDB. In contrast, ElastiCache is a more generic caching solution and can be used with various data sources.
How the Exam Tests This
The SAA-C03 exam often includes questions that assess your understanding of when to use DynamoDB. Here are a few patterns:
- Scenario-Based Questions: You might be presented with a use case requiring a database solution. Identify if it fits the high-scale, simple access pattern model.
- Architectural Decision Questions: Expect questions that test your knowledge of capacity modes or access pattern modeling. The exam rewards clarity in architectural decisions.
- Problem-Solving Questions: You may encounter questions about mitigating hot partitions or choosing between caching solutions. Understand the trade-offs involved.
The Rule to Remember
DynamoDB is unbeatable for high-scale applications with simple access patterns, demanding careful design of access patterns and partition keys.