Azure Cosmos DB Pricing Compared to DynamoDB and NeptuneDB

This week at the Microsoft Build conference a new provisioning option for Cosmos DB was announced. The new option, to provision throughput for a set of containers, is a wonderful new feature. However, this meant I needed to take some time to understand Azure Cosmos DB pricing compared to DynamoDB and NeptuneDB.

This new provisioning feature for Cosmos DB offers more granularity than previously. Now, we are allowed to provision a set of containers, say with 50,000 RU/s to be shared. Then, you can create collections to have a piece of the 50,000  instead of needed to create new Cosmos DB for your applications that have different throughput needs.

The 50,000 number isn’t something I pulled out of thin air. It is the minimum number you are allowed to use. A quick look at the pricing calculator show us the cost, at a minimum, for this new feature:

 

Azure CosmosDB Pricing

 

At $3k a month, this new provisioning option seems expensive. The minimum for CosmosDB is 400 RU/s, and that’s only about $30/month to get started. This 50k minimum and $3k/month costs have been discussed a bit online, mostly by people complaining that the cost is too much. My first thought to seeing such complaints was “this isn’t the right solution for you”, followed by “how much would a similar offering from AWS cost?”

That’s what I want to do here today. Let’s break this down.

 

Pricing Specifications

We need to set the stage for our comparison. Here’s the reference I will use as a starting point:

 

Azure CosmosDB Pricing

 

That table shows us some examples of throughput capacity. It breaks down item size along with reads and writes. This shows us the total number of RU/s needed.

The fifth line is the one we will use as our base. We are going to assume an item size of 64kb, and a 5:1 ratio of reads to writes. At a 50,000 RU/s minimum for the new provisioning option, that implies we should have about 2500 reads and 500 writes per second. We will also use 100GB as our storage requirement.

Lastly, we will split the workload in Cosmos DB to be 50-50 between graph and non-graph. The reason for this is because AWS doesn’t have an all-in-one service like Cosmos DB. We will need to compare to AWS DynamoDB and AWS NeptuneDB.

 

Amazon DynamoDB Pricing

I am going to configure the AWS monthly calculator for 50Gb of storage, and we will assume that 40GB is egress, and 10Gb is ingress. We will set the item size to be 64k, the reads/sec to 1250, and the writes/sec to 250. The Cosmos DB numbers were set to a consistency state of “session”, which is in the middle between strong and eventual. Since AWS doesn’t offer this level, I will go with eventual consistency, which lowers the price overall:

 

AWS DynamoDB Pricing

 

So, that would cost over $9k, and wouldn’t include our graph database needs. So, let’s get that number next.

 

Amazon NeptuneDB Pricing

The AWS monthly calculator does not have NeptuneDB as an option yet. I am guessing this is because NeptuneDB is still in preview. So we need to do this by hand.

From the Neptune pricing page, it the billing involves the size of the instance, storage, I/O, and data transfer. For our purposes, we will use the lower end instance (db.r3.large). We will use 50GB for storage. We will use 40GB egress and 10GB ingress. For the requests, we need to do some math. We need to calculate the total number of requests per month in Cosmos DB. We need to do this in order to convert into the pricing metric for NeptuneDB. Half the Cosmos DB workload would be 25k RU/s, and that works out to be (25000 * 720 * 3600) 64,800,000,000 requests a month. NeptuneDB charges $0.20 per million, so that works out to be (64800000000 / 1000000 * $0.20) = $12,960.

So, the total for NeptuneDB would be:

– The db.r3.large instance is $252/month
– The 50 Gb storage is $5/month
– The 64,800 million requests are $12,960/month
– The data transfer rate is $3.60/month

That’s a total of $13220.60, just for NeptuneDB. And that makes the AWS offering(s) a total of $22636.43/month.

Just a tad more expensive than the CosmosDB monthly price.

 

Summary

The new provisioning option for Cosmos DB allows for greater flexibility in how to manage workloads for your specific containers. Previously you would have had to provision new Cosmos DB instances in order to meet your RU/s requirements. Allowing for customers to group a set of containers and share throughput is a wonderful new feature.

But this feature has a minimum requirement of 50,000 RU/s, which has a price tag of $3k/month. That is likely going to price some people out for now. I can see a scenario where Microsoft reduces the 50k minimum. They’ve reduced costs before, doing so again would not be unprecedented.

And when you compare the throughput evenly across AWS DynamoDB and NeptuneDB, $3k is a bargain. This becomes more apparent when you consider additional things such as performance, recovery, availability, and multi-master.

4 thoughts on “Azure Cosmos DB Pricing Compared to DynamoDB and NeptuneDB”

  1. Thank for a great article and the good point about the “right solution”. If one needs a place to park some data that needs to be accessed really, really fast then, depending upon the application involved it might indeed be the right solution.

    Reply
  2. The part of your post on “this isn’t the right solution for you” is correct. CosmosDB isn’t the platform for anyone moving a MongoDB application to this platform unless you are building a massive size solution or have a big budget and dont care what the data storage layer costs for you.

    What costs you $200 in MongoDB atlas costs you about $1K a month in CosmosDB. The 50K RU spread model did nothing to address any of the cost concerns for people running MongoDB apps that by pattern use multiple collections to structure their app and don’t necessarily need high scale.

    If they just let you adjust this to your needs…all would be well…but alas its not meant to be. Great service for service for sure….but expensive…you bet. What would your Azure SQL Database pricing be if that product charged and scaled by table? Why is SQL pricing so much more affordable?

    I just wish Microsoft would have done a low cost PaaS hosted MongoDB like they do for MySQL instead of the expensive fancy low latency one that they built out.

    So unless you are in an enterprise shop or have a big budget…go with MongoDB atlas and have its VMs run on Azure until you can afford or need CosmosDB.

    Reply
    • Thanks for the comment! In my experience, the pricing for services in Azure get adjusted downward over time. I would expect that same to happen for CosmosDB, too.

      Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.