TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Has anyone migrated a Mongo db to Azure Cosmos witho draining credit?

2 pointsby emadehsanabout 7 years ago
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 &quot;removing documents&quot;. But index won&#x27;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 &amp; 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).<p>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&#x2F;maintaining Mongo to Cosmos?<p>[1] https:&#x2F;&#x2F;docs.microsoft.com&#x2F;en-us&#x2F;azure&#x2F;cosmos-db&#x2F;request-units#estimating-throughput-needs

2 comments

mat_keepabout 7 years ago
Hi Have you tried using MongoDB Atlas for your Mongo database? It&#x27;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) <a href="https:&#x2F;&#x2F;www.mongodb.com&#x2F;cloud&#x2F;atlas" rel="nofollow">https:&#x2F;&#x2F;www.mongodb.com&#x2F;cloud&#x2F;atlas</a><p>It includes a free tier for experimentation and evaluation (currently only available on AWS)<p>And as this is real MongoDB, rather than a Cosmos shim of the APIs, all the features of MongoDB actually work....<p>Disclosure: I work at MongoDB
Zekioabout 7 years ago
I would recommend using <a href="https:&#x2F;&#x2F;docs.microsoft.com&#x2F;en-us&#x2F;azure&#x2F;cosmos-db&#x2F;local-emulator" rel="nofollow">https:&#x2F;&#x2F;docs.microsoft.com&#x2F;en-us&#x2F;azure&#x2F;cosmos-db&#x2F;local-emula...</a> when testing stuff related to Cosmos DB
评论 #17004480 未加载