Did anyone run any comparison between Azure SQL cost vs DocumentDB/CosmosDB cost? The RU that's presented in the Azure CosmosDB cost is not clear to me. E.g., 1 request in 1 TB db cannot be equal with 1 request in 1 GB db.
问题:
回答1:
First, you cannot reliably generalize a comparison of cost between relational Azure SQL cost and NoSQL CosmosDB cost, because they are significantly different things. They are not interchangeable, they would require different data modelling depending on planned usage and chosen optimization points. The cost (development + azure bill + future maintenance) can vary a lot depending on your load and usage.
So the general answer is the rather useless "it depends".
See more about sql vs noSQL differences, also some considerations about switching from sql to nosql.
The best way to get a better understanding of what a RU is, is to experiment by generating realistic data and examining realistic queries and deduce target cost from it. If you get your document by id or from a selective-enough index (and you should never scan in docDB), then most likely the RU cost is similar in GB vs TB DB.
If you lack the time to test with realistic data/queries, then you could play with https://www.documentdb.com/capacityplanner .
NB! Please note that both approaches require you already have some idea how you would lay out your data in NoSQL. NoSQL documents are not equivalent to SQL rows -or- tables. See "Modeling Data for NoSQL Document Databases" persentation by Ryan CrawCour, David Makogon for ideas what to consider when designing for noSQL.