Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MongoLab vs Azure Table Storage

Take a 100gb database for this example:

Azure Storage cost: £6.05/m MongoLab on AWS with 1 node cost: £153.18 /m

Am I missing something? Calculated something incorrectly? Can someone clear things up for me here? I would much rather use MongoLab as I really like node/mongoDB. But it seems a much more cost effective solution to go with the Table Storage.

I know the differences between Key/Value and Document store and I do prefer the latter.

like image 393
MaxWillmott Avatar asked Feb 07 '13 13:02

MaxWillmott


People also ask

Is Azure table storage being deprecated?

Azure table storage is deprecated, but still in use by some organizations. Many organizations are still using Azure table storage because it is easy to use, and it has a lot of features. However, as Azure table storage becomes more difficult to use, organizations may want to look into alternatives, such as Cosmos DB.

What is the difference between Azure table storage and Cosmos DB?

Azure Table Storage supports a single region with an optional read-only secondary region for availability. Cosmos DB supports distribution from 1 to more than 30 regions with automatic failovers worldwide. You can easily manage this from the Azure portal and define the failover behavior.

When should I use Azure table storage?

Azure tables are ideal for storing structured, non-relational data. Common uses of Table storage include: Storing TBs of structured data capable of serving web scale applications. Storing datasets that don't require complex joins, foreign keys, or stored procedures and can be denormalized for fast access.

Is Azure table storage cheaper than Azure SQL Database?

Azure tables are only cheaper than SQL Azure if the data access pattern is relatively light, since tables have a per-transaction fee and SQL Azure doesn't.


1 Answers

You need to consider that Azure Table Storage (ATS) is storage-as-a-service. You don't need to set up any servers to manage the storage and related CRUD operations. This is handled for you by Azure, as ATS is a massive multi-tenant system. You simply ask for an account, receive an endpoint (plus primary & secondary key), and off you go, paying about 7 cents per GB (and a penny per 100K transactions, which is fairly insignificant).

With MongoDB, you'd need to stage your own server(s), whether in AWS or in Azure (or on-premises or anywhere else), as well as provisioning storage. Out-of-the-box, today's cloud providers don't have a native MongoDB-as-a-Service offering. Your cost basis is now much higher than ATS, and you're responsible for backups/snapshots, MongoDB maintenance, etc. Even a bare-bones MongoDB deployment will cost you at least two virtual machine instances (a standalone server in production is not advisable due to periodic downtime). The smallest Azure instances are $0.02 / hour or about $14 monthly x 2, for a minimum footprint of about $30 / month (this is a low end virtual machine with under 1GB RAM; it will not provide you with high-performance MongoDB, but may work great for just a point-of-presence web site or blog with little traffic). Sacrificing availability, you could run a single extra-small instance at $14 / month plus storage cost (which needs to be in durable storage, so you're talking about 7 cents / GB / month).

Now, you mention MongoLab. They do have MongoDB-as-a-Service, and have built a multi-tenant hosting solution, and their service is available on several clouds, including Azure. The price they charge accounts for their investment in virtual machine instances, storage, and bandwidth, as well as server maintenance, backup strategies, support, high availability, monitoring, etc.

I wouldn't get too fixated on storage cost being your only determining factor. If you need to do any type of complex queries requiring, say, multiple indexed fields, with ATS you'll need to construct additional tables to provide those indexes (or you'll end up doing partition scans or table scans to find the content you need). MongoDB has a very powerful searching and aggregation engine. If your app needs this, you might spend more money on developer-time engineering and maintaining additional table storage complexity, vs. using MongoDB and having your app running "today." If, on the other hand, you have data that fits really well in table storage, where partition + row key covers the vast majority of your search cases, and you can take advantage of entity group transactions for atomic updates, you should consider table storage for not only cost but for scale (200TB per storage account) and performance.

I hope this helps...

like image 106
David Makogon Avatar answered Oct 09 '22 05:10

David Makogon