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.