-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
priority based throttling for python sdk #32441
Conversation
Priority-based execution is a capability which allows users to specify priority for the request sent to Azure Cosmos DB. Based on the priority specified by the user, if there are more requests than the configured RU/s in a second, then Azure Cosmos DB will throttle low priority requests to allow high priority requests to execute.
updated changelog
…e-sdk-for-python into priority-throttling
/azp run python - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
API change check APIView has identified API level changes in this PR and created following API reviews. |
/azp run python - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
looks good otherwise, but we should make some clarifications in the README - this isn't openly available.
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.
I don't see any tests - is there any way we can confirm programmatically that this header is being set correctly?
/azp run python - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
Created test to verify we set the request headers of priority level with the correct value
/azp run python - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
Description
Priority-based execution is a capability which allows users to specify priority for the request sent to Azure Cosmos DB. Based on the priority specified by the user, if there are more requests than the configured RU/s in a second, then Azure Cosmos DB will throttle low priority requests to allow high priority requests to execute.
In the python sdk this preview feature can be used by passing a string of either "Low" or "High" (Both are case insensitive) to the priority_level keyword on a request. Requests this can be used on but not limited to are read, write, and query requests.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines