A STAR story for a third-party outage: cascading failure through timeouts and retries, mitigation with circuit breakers, fallbacks and queuing, communication, and resilience changes afterwards.
My story is [the payment provider] slowing from [300 ms] to [30 s] for [40 minutes]. Our HttpClient had the default 100-second timeout and three retries, so requests piled up, held threads and connections, and our whole API started failing, not just payments. I confirmed it from the Application Insights dependency view and the provider's status page, then switched payments to an 'accept order, charge later' path behind a feature flag so customers could still check out. Afterwards I added Microsoft.Extensions.Http.Resilience with a [3 s] attempt timeout, a circuit breaker and jittered retries only on idempotent calls, and moved charging behind a queue. The next provider outage cost [zero] failed checkouts. The trade-off: deferring the charge means some orders later fail payment, so it needs a business decision.
"At [company], our [checkout API] called [a payment provider] synchronously. One [Friday evening] the provider didn't go down, it got slow: calls went from [300 ms] to [30 seconds]. That was worse than an outage. Our HttpClient used the default 100-second timeout plus three retries, so each checkout held a thread and a connection for minutes. Within [ten] minutes the whole API was timing out, including pages that had nothing to do with payments.
I was [on call]. The Application Insights application map showed the provider's dependency duration had exploded while everything else looked normal, and their status page confirmed 'degraded performance'. I made two calls. First, I turned on an existing feature flag that took the payment call out of the request: we accepted the order, put a 'charge pending' message on a Service Bus queue, and told the customer they'd get a confirmation email. Second, I cut the retry count to zero through configuration so we stopped adding load. The rest of the API recovered in about [five] minutes, and checkout kept working. I posted updates in the incident channel and the support team got a customer message template.
Afterwards I replaced our hand-rolled retry with Microsoft.Extensions.Http.Resilience: a [3-second] per-attempt timeout, a circuit breaker that opens at a [20%] failure ratio, and jittered retries only for idempotent calls with an idempotency key. Charging moved permanently to the queue-based worker. When the provider had another outage [three months] later, we had no failed checkouts and the queue drained in [12] minutes after recovery. The lesson: every dependency will fail, so the question is whether it takes you down with it."
| Stage | Mechanism |
|---|---|
| Dependency slows | Each call holds a thread (or async state) and an outbound connection |
| Long timeout | Requests stay in flight for 100 s (HttpClient default) |
| Retries | Multiply load on an already struggling provider |
| Resource exhaustion | Connection limits, ThreadPool starvation if any code blocks, memory |
| Cascade | Unrelated endpoints share the same pool and fail too |
| Tool | Effect | Trade-off |
|---|---|---|
| Short attempt timeout | Fail fast | Slow but healthy calls fail |
| Circuit breaker | Stops calling a failing dependency | Need a fallback for when it's open |
| Fallback / degrade | Cached data, "pending" state, hide feature | Business has to accept the degraded behaviour |
| Queue and process later | Decouples customer from dependency | Eventual consistency; failure handling later |
| Bulkhead (concurrency limit) | One dependency can't use all resources | Excess calls rejected |
Template: [payment provider] p95 [300 ms] → [30 s] for [40 min]; our API error rate [0.2%] → [35%]; feature flag to deferred charging restored service in [5] min; next outage [3] months later: [0] failed checkouts, queue drained in [12] min.
Checks whether you understand how dependency failures cascade, can contain the damage during an outage you don't control, and design so the next one hurts less.
Green flags
Red flags
This story tests resilience thinking: do you understand how a dependency failure cascades, do you mitigate with fail-fast and degradation rather than heroics, and do you involve the business in the trade-off (for example, deferring payments). It also checks communication during an incident you don't control.
Client -> Checkout API --(HttpClient, 100 s timeout, 3 retries)--> Provider (30 s responses)
|
in-flight requests grow: arrival rate x time in system (Little's law)
|
400 req/s x 30 s = 12,000 concurrent requests -> connection limits, memory, threads
|
every endpoint on the instance slows -> health probes fail -> restarts
Little's law makes the point with a number: concurrency = throughput × latency. When latency goes up 100×, concurrency does too, unless you cap it.
IHttpClientFactory with Microsoft.Extensions.Http.Resilience (built on Polly v8): AddStandardResilienceHandler() gives rate limiter, total timeout, retry, circuit breaker and attempt timeout; AddResilienceHandler("name", ...) builds a custom pipeline.FailureRatio, MinimumThroughput, SamplingDuration, BreakDuration.STAR, with two clear decisions in the Action (degrade, stop retries). The SOAR variant fits well because the obstacle is that you don't control the dependency.
Weak: "we waited for them to fix it." Good: added a circuit breaker afterwards. Strong: explains the cascade and the mitigation during the incident. Excellent: involved the business in the degradation decision, communicated well, and proved the change in the next outage.
This story also answers "a time you made a decision without full information", "a time you worked with an external party" and "a time you designed for failure". For a non-technical interviewer: "The payment company got very slow and dragged our whole site down. I switched us to take orders and charge later, then changed the design so their problems can't take us down again."
AddResilienceHandler with a 2-second attempt timeout and a circuit breaker; repeat.OnOpened, OnClosed) and watch them under a simulated outage.The resilience pipeline added after the incident (Microsoft.Extensions.Http.Resilience, Polly v8 options).
using Microsoft.Extensions.Http.Resilience;
using Polly;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddHttpClient<PaymentClient>(c => c.BaseAddress = new Uri("https://payments.example.com"))
.AddResilienceHandler("payments", pipeline =>
{
// Outer budget for the whole call including retries.
pipeline.AddTimeout(TimeSpan.FromSeconds(8));
// Retries only make sense because every charge carries an idempotency key.
pipeline.AddRetry(new HttpRetryStrategyOptions
{
MaxRetryAttempts = 2,
BackoffType = DelayBackoffType.Exponential,
UseJitter = true
});
// Stop calling a failing provider; fail fast so the rest of the API stays healthy.
pipeline.AddCircuitBreaker(new HttpCircuitBreakerStrategyOptions
{
FailureRatio = 0.2,
MinimumThroughput = 20,
SamplingDuration = TimeSpan.FromSeconds(30),
BreakDuration = TimeSpan.FromSeconds(30)
});
// Per-attempt timeout instead of HttpClient's 100 s default.
pipeline.AddTimeout(TimeSpan.FromSeconds(3));
});
var app = builder.Build();
app.Run();
public sealed class PaymentClient(HttpClient http)
{
public async Task<HttpResponseMessage> ChargeAsync(Guid orderId, decimal amount, CancellationToken ct)
{
using var request = new HttpRequestMessage(HttpMethod.Post, "/charges")
{
Content = JsonContent.Create(new { orderId, amount })
};
request.Headers.Add("Idempotency-Key", orderId.ToString()); // safe to retry
return await http.SendAsync(request, ct);
}
}
STAR template
S: [Service] called [provider] synchronously; [traffic].
T: [Provider] slowed to [X s]; our [whole API] was failing; I was [on call].
A: Confirmed via [App Insights / status page]; [flag to degrade / queue]; [cut retries]; communicated [how];
afterwards [timeouts, circuit breaker, idempotent retries, queue].
R: Recovered in [N min]; next outage: [0 failed checkouts], queue drained in [N min].
Illustrative only: payment provider 300 ms -> 30 s; deferred charging behind a flag; 0 failed checkouts next time.
HttpClient.Timeout at its default. Why it is wrong: It is still 100 seconds in .NET 10, so a slow provider keeps requests in flight for minutes once retries are counted. Instead: Set per-attempt and total timeouts from your SLO with the resilience handler, and set HttpClient.Timeout above the pipeline's total so they don't fight.The senior answer owns the blast radius even when the root cause is someone else's. It shows you understand the cascade, mitigate by failing fast and degrading, and turned the incident into design changes the business agreed to. Proving the change in a later outage is the strongest result you can give.
Use Little's law in production terms. At [400] req/s and [300 ms], about [120] checkout requests are in flight per cluster. At [30 s] that becomes [12,000]: outbound connections, memory per request and any blocking code all scale with it, which is why unrelated endpoints failed. The same arithmetic tells you how to size things in advance: set timeouts so in-flight work stays within what an instance can hold, leave headroom for retries before peak events, and alert on dependency latency, not just errors, so you see the slope before the cliff.
| Pattern | When it fits | Cost | When not to |
|---|---|---|---|
| Timeouts + circuit breaker | Every remote call | Tuning; some false trips | Never skip |
| Async hand-off via queue | Work that can complete later (charging, emails) | Eventual consistency, compensations | Customer needs an answer now (e.g. card auth for fraud checks) |
| Cached fallback | Read data that tolerates staleness (rates, catalogue) | Stale answers | Money movement, permissions |
| Second provider | Critical dependency, high revenue | Integration and contract cost | Low-value dependency |
| Bulkhead | Shared instance with many dependencies | Rejected calls | Single-purpose service |
I split the request into time in my code and time in dependencies. In Application Insights, the end-to-end transaction view and a KQL query comparing request duration with the sum of its dependency durations tell me quickly: if one dependency's p95 jumped at 10 am, it's them; if dependencies are normal but requests are slow, the time is in my process. A gap before a dependency call starts means queueing inside my service: ThreadPool starvation, an exhausted connection pool or a rate limiter. dotnet-counters confirms CPU, GC and queue lengths. For a slow dependency I contain it with per-attempt timeouts, a circuit breaker, a bulkhead and a fallback; for my own code I roll back or scale while I fix it. The trade-off: aggressive timeouts protect you but turn slowness into errors, so they need fallbacks.
It is a valid trigger, but not a useful root cause, because nothing in it is ours to change. The next question is why our system failed along with the provider: a single region or zone, no timeout or circuit breaker, no bulkhead isolating the dependency, a hard dependency on the critical path, no degraded mode. Those become the actions: zone redundancy or a paired region where the business case justifies it, timeouts, circuit breakers and fallbacks, caching, an explicit SLO we design to given the provider's published SLA, and alerts on the dependency's health plus Azure Service Health notifications. The postmortem then tracks whether those resilience changes actually reduce impact next time, for example in a game day that simulates the outage.
I structure it so leadership gets the answer in the first minute: a three-sentence summary (what happened, impact, current state), then impact in numbers, a UTC timeline of trigger, impact, detection, mitigation and recovery, the root cause as a system condition, contributing factors, what went well, lessons learned and three to five owned actions, including customer remediation and communication. In the payments example: a release added retries to fix real provider timeouts, but POST /charges creates a new charge on every call unless it carries an idempotency key, which the provider uses to return the first result for a repeat. Ours sent none, so a timeout after the provider had charged the card produced a second charge. Detection took hours because alerts watched errors, not duplicates. Every claim links to evidence. The trade-off: brevity for leadership versus detail for engineers, so I keep the detail in an appendix.
How to tell it (STAR)
**S:** At [company] our [checkout API] called [the payment provider] synchronously, and one [Friday evening] their responses slowed from [300 milliseconds] to [30 seconds]. **T:** I was [on call], and because of long timeouts and retries, our whole API was failing, not just payments. **A:** I confirmed from Application Insights and their status page that the provider was the cause, turned on a flag to take orders and charge later through a queue, and cut retries to zero so we stopped piling on. The API recovered in [five] minutes and I kept support updated. Afterwards I added proper timeouts, a circuit breaker and idempotent retries, and moved charging to the queue permanently, which [the product owner] signed off. **R:** When the provider failed again [three months] later, we had [zero] failed checkouts and the backlog cleared in [12] minutes.
Last updated 23 Nov 2026.