-
Notifications
You must be signed in to change notification settings - Fork 64
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
Exception could be improved for request rate exceeded on a cosmosdb backed table #41
Comments
I'll have a look on a weekend. Should be doable. The only bad thing is that I have absolutely no idea how to write a failing test for this scenario. Perhaps, we can try to create an explicit test which could be run manually against real CosmosDb (not emulator) . |
CosmosDB emulator supports rate limiting - there is an option in the
context menu of the tray icon to enable / disable rate limiting.
…On Fri, 1 Dec 2017 22:31 Yevhen Bobrov, ***@***.***> wrote:
I'll have a look on a weekend. Should be doable.
The only bad thing is that I have absolutely no idea how to write a
failing test for this scenario. Perhaps, we can try to create an
*explicit* test which could be run manually against real CosmosDb (not
emulator) .
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#41 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABsWj18gkxe1CB1EJZf3VmgTJ0676cysks5s8H5MgaJpZM4Qxyf0>
.
|
@jkonecki Oh, cool! Didn't know. I don't even have it installed on my machine )) |
@johlrich How do you connect to table api? Connection string format? Have you tried running against local cosmosdb emulator? |
Normal connection string format for Storage Tables, just different url worked against an account provisioned in the portal: Unfortunately, I don't believe the emulator can be used at this time since it doesn't support the table endpoints. |
@yevhen For manual testing, folks without a current azure subscription should still be able to run the test with one of the time limited instances they started offering. https://azure.microsoft.com/en-us/try/cosmosdb/ As an aside, something I'm finding interesting about this approach is that you can still connect to the documentdb api through its endpoint ( |
I've checked it and I'm afraid that Azure SDK doesn't correctly handle the throttling scenario. What's interesting is that I've then inspected (with Fiddler) the api response and it also doesn't contain this information. Moreover, the response status code is still 202 (Accepted) while 429 is mentioned in the body 😞 Looks like CosmosDb Table api support is half-baked at this moment. @johlrich you need to open an issue against Cosmos, since SS doesn't do anything destructive to error information returned by the service. |
You can obtain HTTP status code of the throttled requests: Please note
|
If you hit your provisioned RU/s rate limit you'll currently get the following message:
The exception has
HttpStatusCode
set to429
it could be used to instead throw a nicer exception about rate limits + suggesting a retry.The only bummer is that I don't see a way using the
StorageException
to get at the http response headerx-ms-retry-after-ms
which contains how long you must wait unless I'm missing something. Could still be better to have something explicit even with that?The text was updated successfully, but these errors were encountered: