Tuesday 26 September 2023

AWS DynamoDB vs Azure CosmosDB vs Azure Table Storage pricing comparison

Using a db size of 10Gb, and 10% writes and 90% reads. Provisioned databases are for 1 year. For AWS SimpleDB the amount of CPU is hard to quantify, so I used the following formulae (0.248+((requestsPerSecond)/1.5*0.14))*usdgbp This matches closly to Azure Table Storage, which is to be expected. Here are the results: (click on image to view)
(click on image to view)
Zooming into the lower end (click on image to view)
Download Azure-CosmosDB-pricing.xlsx spreadsheet here.

Summary: 

Both AWS and Azure are similar in NoSQL pricing. For the small companies out there needing the cheapest NoSQL options there is Azure Table Storage and AWS SimpleDB. These are the cheapest up until you hit 400 reads per seconds which is plenty for most companies. However, be aware of the per-item size constraints below.

Table Storage is about 13ms for a read and CosmosDB is about 8ms.

Many developers use Amazon SimpleDB in conjunction with Amazon Simple Storage Service (Amazon S3). Amazon SimpleDB can be used to store pointers to Amazon S3 object locations and detailed information about the objects (metadata), thereby supplementing Amazon S3 with the rich query functionality of a database.

After 400 reads per seconds, then its Azure CosmosDB and AWS DynamoDB until you hit 600 reads per second.

600+ reads per seconds then AWS DynamoDB Provisioned is the cheapest.

Per item size constraints:
  • AWS DynamoDB: 400Kb.
  • AWS SimpleDB 256 name/values, each having a max size of 1Kb.
  • Azure CosmosDB: 2Mb.
  • Azure Table Storage: 131Kb.

Warning: "CosmosDB Serverless" and "AWS Dynamo DB on demand" can get very expensive very quickly. They correlate very closely with each other on price. So if you find yourself going over 50 reads/writes per second, move onto another tariff.