azure-docs icon indicating copy to clipboard operation
azure-docs copied to clipboard

Add Rate Limiting Examples

Open jonlave opened this issue 1 year ago • 2 comments

The article has Rate Limiting in the title, but doesn't actually offer any concrete examples of using rate limiting when calling Cosmos DB. .Net 7 introduced a rate limiting classes, so that would be a great starting point in creating code examples of using those for Cosmos DB.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

jonlave avatar May 25 '23 19:05 jonlave

@jonlave Thank you for reaching out. We will review this and make update as appropriate.

Oury-MSFT avatar May 25 '23 21:05 Oury-MSFT

@jonlave

I have submitted a PR to add these links:

  • https://github.com/mspnp/go-batcher: A GoLang implementation of rate-limiting for Cosmos DB.
  • https://learn.microsoft.com/en-us/azure/architecture/patterns/rate-limiting-pattern: The original Azure Architecture Center article that discusses rate limiting as a pattern.

I am not aware of any .NET samples. The pattern is for distributed rate-limiting across multiple replicas, so I don't believe the out-of-the-box .NET 7 rate limiters will apply though there are primitives to create your own rate limiters and that could be implemented in keeping with this pattern.

You can reach me on Teams too (Peter Lasne), if you want to discuss further.

plasne avatar Jun 02 '23 17:06 plasne

#please-close

seesharprun avatar Aug 02 '23 17:08 seesharprun