Closed Mortana89 closed 5 years ago
Hello @Mortana89
Let me get this straight. If you provision database throughput and then run Cosmonaut against that database, will it create collections with dedicated throughput on top of the database throughput?
That's indeed correct!
Oh, we don't want that. I will have to verify the behaviour locally but if that is the case then I will add a check to see if the collection has an offer, and if it does, then the throughput value on the collection level will be ignored.
For now, I recommend provisioning your database and your collections before you start using Cosmonaut against them, if you want database level provisioning.
Oh, we don't want that. I will have to verify the behaviour locally but if that is the case then I will add a check to see if the collection has an offer, and if it does, then the throughput value on the collection level will be ignored.
For now, I recommend provisioning your database and your collections before you start using Cosmonaut against them, if you want database level provisioning.
Thanks. I will for now. Currently I use cosmonaut in a microservice, which creates a collection per 'event' it receives, but we're still in development so I can cope with manually changing this in Cosmos DB as it isn't doing this many times. The emulator is a bit tricky to spot this issue, but you can easily see it in the Azure instance. All collections that are shared, have this indicated on the homepage of the Cosmos DB resource:
The emulator also supports this sharing on DB level, but it doesn't visualize it as clearly.
I am wondering. Why do you go about it that way? You you mean one collection per event type? One collection per event (single document) wouldn't make sense.
I am wondering. Why do you go about it that way? You you mean one collection per event type? One collection per event (single document) wouldn't make sense.
It's a multi-tenant application, once a tenant is registered, we need to approve his registration. Approving his registration fires a 'TenantApproved' event on our bus, an all our microservices do their work (like, creating a dedicated collection for this tenant to store microservice specific data).
Ok i just verified that it's an issue. I will be fixing that issue by adding an extra property on the settings.
Something like.
Does this sound good?
Ok i just verified that it's an issue. I will be fixing that issue by adding an extra property on the settings.
Something like.
- OnDatabaseThroughput = ThroughputBehaviour.UseCollectionThroughput
- OnDatabaseThroughput = ThroughputBehaviour.UseDatabaseThroughput
Does this sound good?
Sounds perfect! Thanks!
Fixed and feature added in 2.9.0
Thanks for the request.
Thanks for implementing!
Don't forget to star the project if you like it. It helps with visibility :)
Hello,
I could not find this directly in the documentation, but, Cosmos DB, since recently, allows to define a shared throughput on DB level, instead of collection level. As such, I want Cosmonaut to not set a fixed throughput on collection level when creating the collection. How can I achieve this?