Posts about Polly
In response to my blog post about client rate limiting with Polly, a colleague brought Microsoft's HTTP resilience NuGet package to my attention. When I took a closer look at it, I was surprised that it actually depended on Polly. This made me even more curious. I wanted to see what benefits it brought over using Polly directly.
One usually thinks of rate limiting in a server-side context, i.e., a service limits the rate of incoming requests. Well, we recently had to add client-side rate limiting to our service, i.e., limit the rate of outgoing requests to a specific upstream server. Fortunately, the Polly resilience library made it relatively simple to implement.
Although it's a good idea to avoid polling in your code if you can, there are still cases when it's necessary. While it's not too difficult to implement the polling loop manually, you can also use the Polly resilience library for that purpose.