-
Notifications
You must be signed in to change notification settings - Fork 87
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
Change CosmosDB max throughput #1487
Change CosmosDB max throughput #1487
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your change is correct, but I left a comment in case you have the time to tweak it a bit more. Also, in order to merge this, you'll need to run the command rush change
. This will prompt you about the changes and let you pick the right version bump required for the change. In this case, there are no API changes, so a fix
change should suffice.
export const MAX_CONTAINER_THROUGHPUT = 400 | ||
export const MAX_DATABASE_THROUGHPUT = 400 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @heavylemon1, first of all, thanks for contributing, it really helps!
These parameters are a bit sensible, and it would be a good idea to allow tweaking them. As a quick-n-dirty solution, we could just try loading them from environment variables like this:
export const MAX_CONTAINER_THROUGHPUT = 400 | |
export const MAX_DATABASE_THROUGHPUT = 400 | |
export const MAX_CONTAINER_THROUGHPUT = process.env.AZURE_MAX_CONTAINER_THROUGHPUT ?? 400 | |
export const MAX_DATABASE_THROUGHPUT = process.env.AZURE_MAX_DATABASE_THROUGHPUT ?? 400 |
If it makes sense to you, could you please add a note to the documentation to make these configuration options visible? I'd say this is the right place: https://docs.boosterframework.com/going-deeper/infrastructure-providers/#azure-provider-configuration
You can find the documentation in the website
folder in the same Booster repository.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it @javiertoledo , I will be changing those as suggested and was also thinking of maybe using parseInt
since CosmosDB Throughput is based on read units which are integers from my understanding (so to ensure they will be as expected).
So, I will first change the implementation to process env,
update the documentation and
run rush change
.
Thanks!
…hput to use process env and added documentation
Hello @javiertoledo ! I added the improvements you suggested in the comments. Regarding the I also added the file generated by |
…mple for cosmosdb throughput
Hi @javiertoledo , Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @heavylemon1, you did everything correctly, sorry for the delay. We've been busy with other things. I'll start the test and merge process now. Thanks for taking care of the suggestions and handling the potential errors. Using parseInt
to make sure the parameter is correct is a good idea!
/integration sha=691ea7d7e14029af46c00b2cad611702f9ec37d5 |
⌛ Integration tests are running... Check their status here 👈 |
❌ Oh no! Integration tests have failed |
1 similar comment
❌ Oh no! Integration tests have failed |
Hi @javiertoledo!
After checking on the web for this, I came through this FAQ from Microsoft Azure regarding this specific thing I think that to fix this issue, we should change the minimum to 1000 (which is minimum RU's for autoscale) instead of 400 or if we have a way of knowing if the RU's are provisioned then have the 400 RU's value. |
/integration sha=691ea7d7e14029af46c00b2cad611702f9ec37d5 |
⌛ Integration tests are running... Check their status here 👈 |
❌ Oh no! Integration tests have failed |
This solves issue #1313 for reducing CosmosDB throughput from 4000 to 400.
I also changed the
MAX_CONTAINER_THROUGHPUT
to 400 since theMAX_DATABASE_THROUGHPUT
will be 400.( please do let me know if I understood this correctly).