Resilience in microservices is not optional — it's fundamental. When you operate a fleet of services that depend on each other, the question is not whether a service will fail, but when, and whether your system can handle it gracefully.

Health Check Patterns

Kubernetes relies on readiness and liveness probes to understand the state of your pods. In .NET, the IHealthCheck interface and the built-in health check middleware give you a clean way to expose rich health information — not just a 200 OK, but meaningful diagnostics about database connectivity, external dependencies, and memory pressure.

Circuit Breakers with Polly

The Polly library remains the gold standard for resilience policies in .NET. In a recent project, we implemented a circuit breaker that opened after three consecutive failures, entered a half-open state after 30 seconds, and tracked metrics to our Grafana dashboard. The result was an 85% reduction in cascading failures during downstream outages.

Graceful Degradation

Not every failure should result in an error response. We design services with fallback strategies — returning cached data, default values, or partial results when dependencies are unavailable. This requires explicit thought about what 'good enough' looks like at every API boundary.