2

I have a mongoDB on Azure cosmos and the performance is horrible. I have below the time for a few requests that my app does on startup and as you can see Mlab is up to 150 times faster! I am using the free sandbox database on Mlab and the D1 shared plan on Azure. Is there something I can do about this?

Mlab

GET / 304                           10.854 ms

GET /ticker/advanced%20micro 304    62.278 ms

GET /bardata/ 304                   48.285 ms

POST /retrievevote 200              0.558 ms 

GET /getwatchlist 404               0.483 ms 


----------


Cosmos

GET / 304                          12.792 ms 

GET /ticker/advanced%20micro 304   4153.169 ms 

GET /bardata/ 304                  63.362 ms 

POST /retrievevote 200             84.527 ms 

GET /getwatchlist 404              1.484 ms
2
  • 1
    CosmosDB is not MongoDB, it's Microsoft's implementation of a "document database" that tries to be MongoDB-compatible. Thus, the same commands run on both databases could return entirely different results. Since CosmosDB is cloud-hosted, I'm not sure if there's anything you could do other than open a support ticket with Microsoft. The fact that Mlab works very well for you suggests that there's nothing wrong with your setup.
    – kevinadi
    Jan 30, 2018 at 22:21
  • CosmosDB is horrible. I participated in the beta testing of the Mongo API when we were part of BizSpark. A few examples, - Cursors don't work or at least not without a shadow collection they set up and charge you for. - Extremely expensive (min. $20/mth per collection for 400RU) and understand 400RU can't handle a simple loop inserting records which will fail at some point in the loop. - Not even 1000RU ($80/mth per collection) is not enough in any sort of low-med workload application. Aug 4, 2022 at 16:01

1 Answer 1

1

CosmosDB is rate limited (c.f. https://docs.microsoft.com/en-us/azure/cosmos-db/set-throughput et. al.) so if you are doing some sort of large query and you have set your RU/s rate very low you will get astoundingly slow results from CosmosDB.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .