3 ms·
Ask HN: Has anyone migrated a Mongo db to Azure Cosmos witho draining credit?
I created Azure CosmosDB instance for MongoDB APIs and migrated my existing database to Cosmos. There was a restriction on unique indexes that: Unique indexes can only be created when collection is empty. So I emptied collection by "removing documents". But index won't appear. I dropped collection and created indexes and restored the collection from backup. Plus, during testing this out, I created and dropped individual collections & whole database 4-5 times in duration of 24 hours. I woke up to see that the cost incurred on Cosmos was $144 for requests made during last day. Database size is hardly 300KB when compressed (so around a couple MBs).
I still have not been able to get my head around RUs (Request Units). Docs say: A request unit is a normalized measure of request processing cost. But IMHO, RUs are much expensive [1]. What was your experience migrating/maintaining Mongo to Cosmos?
[1] https://docs.microsoft.com/en-us/azure/cosmos-db/request-units#estimating-throughput-needs
- Zekio 8y agoI would recommend using https://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator https://docs.microsoft.com/en-us/azure/cosmos-db/local-emula... when testing stuff related to Cosmos DB
- emadehsan 8y agoThanks Zekio. I think this emulator would be much handy next time.
- mat_keep 8y agoHi Have you tried using MongoDB Atlas for your Mongo database? It's an on-demand, fully managed database service that you can provision on Azure, AWS, or GCP (so no lock in to any 1 cloud provider) https://www.mongodb.com/cloud/atlas https://www.mongodb.com/cloud/atlas It includes a free tier for experimentation and evaluation (currently only available on AWS) And as this is real MongoDB, rather than a Cosmos shim of the APIs, all the features of MongoDB actually work.... Disclosure: I work at MongoDB