New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Share throughput over containers #123
Comments
Hey, @mabvanaartrijk I like this idea, so what you are saying is rather than setting the throughput at each level of each container, you would like the throughput at the database level that all the containers share? (I do just need to check on how this works in terms of database level throughput not something I have done before) Around the issue with not allowing manually created container's could you provide more information on this, please? |
Hi @mumby0168 . Yes, if you create a new container in the Data Explorer on Azure Portal you have the option to provision dedicated throughput for the container. So a RepositoryOptions__ShareDatabaseThroughput option would be really helpful. Steps to reproduce the issue:
Thanks! |
Hey @mabvanaartrijk thanks for the detailed response, ah okay I see what is happening here. So the option you have set Is the desired behaviour you would expect to be that if you have configured the setting |
Thanks @mumby0168! I've misinterpreted the SyncAllContainerProperties setting. It works perfectly with this setting to false. So to recap: manually creating the collections in Data Explorer and setting SyncAllContainerProperties to false works. It would be a nice feature if you can set RepositoryOptions__ShareDatabaseThroughput and use a shared database throughput setting for all underling containers, that are created automatically if they don't exist. |
Great news @mabvanaartrijk yeah it certainly could be would this be something you'd like to look to implement? We are happy to accept any PR's |
I'll discuss with my team if we can add it to one of our next sprints👍 |
Great look forward to hearing from you 👍 |
Hi @mumby0168 @mabvanaartrijk @IEvangelist I've been looking at exactly this need today. Currently all our containers are getting their own throughput which is looking like an expensive hobby $! Database level throughput would be great for test environments in particular but likely also prod until we know what the userbase will be like as cost is a consideration for my client. I think possibly more than a bool might be a nice option. Initially I was looking to populate using ARM templates but if we could get it into the repo that would be a much better option for us. ARM examples are as per:
CosmosClient.CreateDatabaseIfNotExistsAsync has an overload to accept ThroughputProperties.
Looking at: I wondered if that might be the spot...
What do we think? I'm struggling for time myself right now as I'll be away for a bit soon but wanted to chip into the discussion with some thoughts. |
Hi @mabvanaartrijk - sorry for not replying earlier. Yes, that looks like the correct place. |
I would say that in the absence of config to the contrary you should default to shared throughput. |
Any word on the adding the feature for RepositoryOptions__ShareDatabaseThroughput? |
Is your feature request related to a problem? Please describe.
If ContainerPerItemType = true, the containers are created with their own throughput (autoscale or manual). However, I would like to share the total database throughput over the containers. This is a setting in Cosmos, but I can't get it to work.
Describe the solution you'd like
Add a setting, or make it possible to use manually created containers (see below).
Describe alternatives you've considered
I've tried to manually create the containers in the Data Explorer, and use those as Cosmos repositories, but this doesn't work.
Additional context
Thanks for this great library🙌
The text was updated successfully, but these errors were encountered: