Erik Mostert
← All projects

Resilience Demo: Naive vs. Resilient Integration

C#ASP.NET CorePollyWireMock.NETk6Next.js

One small, self-contained repo (no database, minutes to clone and run) modeling a real pain point from third-party integration work: what happens when the dependency you're calling goes down mid-request. The naive client is a plain HttpClient call with no retry, no timeout override, no circuit breaker. The resilient client wraps the same call in a hand-composed Polly v8 pipeline (retry with backoff+jitter, circuit breaker, per-attempt timeout, graceful fallback) via Microsoft.Extensions.Http.Resilience, built test-first against a WireMock.NET-simulated dependency. A single k6 script drives both clients through an identical scripted health -> outage -> recovery cycle in one run, so the comparison reflects the exact same failure window, not two separately-timed tests.