Quick Answer
Retry policies with Polly: Install Microsoft.Extensions.Http.Polly. AddHttpClient().AddTransientHttpErrorPolicy(p => p.WaitAndRetryAsync(3, retry => TimeSpan.FromSeconds(Math.Pow(2, retry)))). Circuit breaker: AdvancedCircuitBreakerAsync(0.5, TimeSpan.FromSeconds(60), 10, TimeSpan.FromSeconds(30)). Retry + circuit breaker is the standard resilience combo for outgoing HTTP calls.
Answer
Resilience protects APIs from transient failures and cascading outages:
Use Polly for retry, circuit breaker, timeout, fallback, and bulkhead isolation policies.
Retry only for safe operations (idempotent GET or PUT).
Use exponential backoff and jitter to avoid retry storms.
Wrap external API calls, DB operations, and messaging clients with policies.
Monitor policy behavior to detect fragile dependencies.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.