Posts about Polly

HTTP resilience wrapper for Polly

March 28th 2025 Polly Dependency Injection .NET

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.

HTTP client rate limiting with Polly

March 7th 2025 Polly .NET

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.

Implement polling using Polly

June 14th 2024 Polly .NET

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.