How DynamoDB Costs Compare With Other Databases
Comparing the most popular NoSQL databases costs
In this article, I’ll compare the costs of DynamoDB with other NoSQL databases.
We’ll be able to understand cost efficiency and when one database may be less expensive than another at similar use.
I’ll evaluate different factors, including deployment models, scalability, and specific use case requirements.
Below is a high-level overview of the differences between the three databases:
Amazon DynamoDB
MongoDB
Apache Cassandra
Firebase Firestore
We’ll examine two popular use cases with these NoSQL databases for these cost comparisons.
Use Case 1: E-commerce Application
For an e-commerce platform that experiences variable traffic with occasional spikes during sales events.
Amazon DynamoDB Cost Breakdown
Using on-demand throughput pricing:
Read Request Units (RRU): $1.25 per million requests
Write Request Units (WRU): $1.25 per million requests
Assuming 10 million reads and 5 million writes per month:
Reads: 10 million * $1.25 = $12.50
Writes: 5 million * $1.25 = $6.25
Total Monthly Cost: $18.75
MongoDB Cost Breakdown
MongoDB Atlas (Managed Service), offers flexible scaling with a subscription-based pricing model.
Cluster Tier: M10 (2 vCPUs, 4GB RAM) suitable for moderate workloads
Monthly Cost: Approximately $57
Total Monthly Cost: $57
Apache Cassandra Cost Breakdown
Self-Managed Deployment: Requires manual setup and maintenance.
Cost Breakdown:
3-node cluster with each node having 2 vCPUs and 4GB RAM
Instance Cost: Approximately $50 per node per month
Total Infrastructure Cost: 3 nodes * $50 = $150
Total Monthly Cost: $150 (without operational and maintenance expenses)
Firebase Firestore
Pay-Per-Use Pricing charges are based on the number of reads, writes, deletes, and storage utilized.
Cost Breakdown:
Reads: $0.06 per 100,000 operations
Writes: $0.18 per 100,000 operations
Deletes: $0.02 per 100,000 operations
Storage: $0.18 per GiB per month
Assuming 10 million reads, 5 million writes, and 1 GiB storage:
Reads: (10 million / 100,000) * $0.06 = $6
Writes: (5 million / 100,000) * $0.18 = $9
Storage: 1 GiB * $0.18 = $0.18
Total Monthly Cost: $15.18
Use Case 2: Social Media Application
For a social media platform that requires high write throughput to handle user posts, likes, and comments.
Amazon DynamoDB Cost breakdown
Provisioned Capacity Mode: Good for applications with predictable workloads.
Cost Breakdown:
Provisioned Write Capacity: 100 write capacity units (WCUs)
Cost per WCU: $0.00065 per hour
Monthly Write Cost: 100 WCUs * $0.00065 * 730 hours = $47.45
Provisioned Read Capacity: 50 read capacity units (RCUs)
Cost per RCU: $0.00013 per hour
Monthly Read Cost: 50 RCUs * $0.00013 * 730 hours = $4.75
Total Monthly Cost: $52.20
MongoDB Cost breakdown
MongoDB Atlas (Managed Service): Requires a higher-tier cluster to handle high write throughput.
Cost Breakdown:
Cluster Tier: M30 (4 vCPUs, 8GB RAM)
Monthly Cost: Approximately $265
Total Monthly Cost: $265
Apache Cassandra Cost Breakdown
Self-Managed Deployment: Designed for high write throughput but requires more resources.
Cost Breakdown:
6 node cluster with each node having 4 vCPUs and 16GB RAM
Instance Cost: Approximately $200 per node per month
Total Infrastructure Cost: 6 nodes * $200 = $1,200
Total Monthly Cost: $1,200 (without operational and maintenance expenses)
Firebase Firestore
Pay-Per-Use Pricing: Firestore charges based on the number of operations, making it flexible for high-write use cases.
Cost Breakdown:
Reads: $0.06 per 100,000 operations
Writes: $0.18 per 100,000 operations
Deletes: $0.02 per 100,000 operations
Storage: $0.18 per GiB per month
Assuming 50 million writes, 10 million reads, and 5 GB storage:
Reads: (10 million / 100,000) * $0.06 = $6
Writes: (50 million / 100,000) * $0.18 = $90
Storage: 5 GiB * $0.18 = $0.90
Total Monthly Cost: $96.90
Summary
Amazon DynamoDB: is cost-effective for applications with unpredictable traffic and high write throughput, especially with on-demand and provisioned capacity modes.
MongoDB: Managed service via Atlas makes it easy to use but at a higher cost, especially for workloads that require more resources.
Apache Cassandra: Good fit for high write throughput applications but involves higher infrastructure costs and maintenance.
Firebase Firestore is a great option for real-time and mobile-first apps but can become costly for high-write operations because of per-operation pricing.
(Note: All price breakdowns were taken from the official database service pricing page).
👋 My name is Uriel Bitton and I’m committed to helping you master Serverless, Cloud Computing, and AWS.
🚀 If you want to learn how to build serverless, scalable, and resilient applications, you can also follow me on Linkedin for valuable daily posts.
Thanks for reading and see you in the next one!