3 ms·
Unfortunately, I could only second this opinion and add a few points of mine. 1. Many unexpected behaviours which you would not encounter in any other software
by llcoolv 7y ago
Unfortunately, I could only second this opinion and add a few points of mine.
1. Many unexpected behaviours which you would not encounter in any other software - for example when you're blocked by its firewall, it would let you connect on all 7 OSI layers, then kick you out with "Command failed with error 13: 'Not Authenticated' on server xyz:10255'". By the way even Azure Portal itself doesn't know how to handle this behaviour correctly and when not included in the firewall whitelist just blinks like crazy.
2. Many seemingly basic features commonly found on other database systems are for some reason missing here - it doesn't support users as such, just issuing resource tokens[1] (which you must implement yourself). Thus, most CDB users just go straight with the master key even on production.
3. It is not fully (nor at least nearly fully) compatible with any of the advertised APIs - SQL doesn't support joins, MongoDB misses quite a few features and adds a requirement for the shardkey to be part of the query. Which is not supported by Spring Data, so you must do low-level queries for everything but select (think updates field by field with null checks).
4. The tooling is horrible - as it is not compatible with neither mongodb nor traditional sql, you would need to include the "CosmosDB Emulator" in your build in order to have at least some predictability. The problem? It only runs on docker4win and a Windows VM would need to be running by all developers on the team and workers of the CI/CD. As of April 2019
5. It is CRAZY expensive and the pricing is not really transparent - in our case we had 20 MB of data, 4 1000RUs collections and multi-master write in Western and Northern Europe. The monthly bill? 300 EUR even though Azure Portal was displaying 1/6 of that cost - apparently for multi-master you multiply by the number of regions + 1 (2+1 = 3) and for geo-redundancy only by the number of regions (2), thus the 6x higher cost. The result of that was that we were paying several times more to manage 20MB of data than for all the remaining data - hundreds of GB.
Maybe if you really, really need the planetary scale, the master-master replication and the <10ms SLAs it would make sense and the hassle and cost would be worth it (though I seriously doubt it), but in any other case it is a massive mistake to go this route.
1. https://docs.microsoft.com/en-us/azure/cosmos-db/secure-access-to-data https://docs.microsoft.com/en-us/azure/cosmos-db/secure-acce...
- pm90 7y ago> It is CRAZY expensive and the pricing is not really transparent - in our case we had 20 MB of data, 4 1000RUs collections and multi-master write in Western and Northern Europe. The monthly bill? 300 EUR even though Azure Portal was displaying 1/6 of that cost - apparently for multi-master you multiply by the number of regions + 1 (2+1 = 3) and for geo-redundancy only by the number of regions (2), thus the 6x higher cost. The result of that was that we were paying several times more to manage 20MB of data than for all the remaining data - hundreds of GB. I get your point and they should definitely fix either the cost calculation, or paste a disclaimer for multi-region pricing. But I want to (sincerely) ask how you could assume that multi region would _not_ cost more than single region.
- llcoolv 7y agoYou are perfectly correct, but I assumed that for 2 regions it would cost twice the amount, not 6 times.
- rnehme 7y agoHi, I am from Cosmos DB engineering team. Thank you for the feedback! We have published a number of documents on pricing transparency and cost optimization of your Cosmos DB cost that we want to make sure everyone is aware of: [1] Pricing model - https://docs.microsoft.com/en-us/azure/cosmos-db/how-pricing-works https://docs.microsoft.com/en-us/azure/cosmos-db/how-pricing... [2] Optimize cost for your dev/test workloads - https://docs.microsoft.com/en-us/azure/cosmos-db/optimize-dev-test https://docs.microsoft.com/en-us/azure/cosmos-db/optimize-de... [3] Total Cost of Ownership (TCO) - https://docs.microsoft.com/en-us/azure/cosmos-db/total-cost-ownership https://docs.microsoft.com/en-us/azure/cosmos-db/total-cost-... [4] Understand your bill - https://docs.microsoft.com/en-us/azure/cosmos-db/understand-your-bill https://docs.microsoft.com/en-us/azure/cosmos-db/understand-... [5] Optimize provisioned throughput cost - https://docs.microsoft.com/en-us/azure/cosmos-db/optimize-cost-throughput https://docs.microsoft.com/en-us/azure/cosmos-db/optimize-co... [6] Optimize query cost - https://docs.microsoft.com/en-us/azure/cosmos-db/optimize-cost-queries https://docs.microsoft.com/en-us/azure/cosmos-db/optimize-co... [7] Optimize storage cost - https://docs.microsoft.com/en-us/azure/cosmos-db/optimize-cost-storage https://docs.microsoft.com/en-us/azure/cosmos-db/optimize-co... [8] Optimize reads and writes cost - https://docs.microsoft.com/en-us/azure/cosmos-db/optimize-cost-reads-writes https://docs.microsoft.com/en-us/azure/cosmos-db/optimize-co... [9] Optimize multi-regions cost - https://docs.microsoft.com/en-us/azure/cosmos-db/optimize-cost-regions https://docs.microsoft.com/en-us/azure/cosmos-db/optimize-co... [10] Optimize with reserved capacity - https://docs.microsoft.com/en-us/azure/cosmos-db/cosmos-db-reserved-capacity https://docs.microsoft.com/en-us/azure/cosmos-db/cosmos-db-r... If you have any questions regarding pricing, please feel free to reach out to us directly at AskCosmosDB@microsoft.com (direct line to the product team). We do really appreciate the feedback. Thank you.
- manigandham 7y agoCosmosDB is a JSON-based document store and it uses partitions to scale out your data. No document-store supports joins. The SQL support is only an interface to your data, it doesn't add relational functionality. The partitionkey is required so that CosmosDB knows which partition to query. You can actually enable broadcast queries which will ask every partition if you don't want to include the partition key, but this will be slower and require more RUs.
- llcoolv 7y agoIn reality it is a document store indeed, but it is advertised by MS themselves as "globally-distributed, multi-model database service". So...
- sthota 7y agoHi, I am from Cosmos DB engineering team. 1. This occurs when, after the connection has been established, CRUD commands are sent before the authentication command. Note that some MongoDB drivers have a bug where they are not authenticating the connection in rare cases and sending CRUD commands. Could you please check and upgrade to the latest driver of Mongoose/NodeJS-Native/NodeJS-Core driver, which has a rewrite of their client-side auth stack and fixes a lot of bugs. One of such issues is described in https://jira.mongodb.org/browse/NODE-1798 https://jira.mongodb.org/browse/NODE-1798 which was fixed by https://github.com/mongodb-js/mongodb-core/commit/7ffb4bbe056777cbaadeab748941e2f47be0fb1f https://github.com/mongodb-js/mongodb-core/commit/7ffb4bbe05... 2. Resource tokens provide fine grained access control but it does require you to implement a custom token management service. We are working on support for Azure AD integration and support for custom roles and policies. The feature is code complete and should be made available soon. 3. Cosmos DB’s SQL query language is supported on a non-relational data model - which maps cleanly to document/column-family/graph. It does not support joins since (unlike a relational model), a single Cosmos container can contain items belonging to any arbitrary schema. 4. Re. API for MongoDB requiring a shard key, we are going to relax this restriction before 7/30/2019. As you noted, we do support an emulator for Windows. We are working on a Linux emulator and should be released later this year. 5. The portal was displaying incorrect cost estimate in certain cases. We addressed it and the fix is being rolled out. Thank you for the feedback!