Q14 · What’s your approach to detecting and isolating slow services?

Back to 24 Architecture Questions.

The question is not “add APM”. The axis it turns on: whether slowness is measured at the caller or the callee, and who absorbs it. A service can look healthy in its own metrics while every one of its callers bleeds capacity waiting for it. Until something isolates the wait, the caller pays for it, in blocked workers and fired timeouts.

Who absorbs the slowness With a direct call, a slow service drains the caller's blocked workers and fires its timeouts. With a buffer in between, the queue absorbs the slowness and its depth and age become the alarm. FIGURE 14 WHO ABSORBS THE SLOWNESS Direct Caller capacity drains Slow Service p99 drifting up measured at the caller: blocked workers, timeouts firing your capacity absorbs the slowness Buffered Caller unaffected Queue backlog grows measured at the queue: depth and oldest-message age a bounded buffer absorbs it, with an alarm

What the answer should contain

Measure at the caller, because that is where slowness becomes someone’s problem. The metric that matters is time spent per dependency at the call site: per-hop durations in distributed tracing, and blocked worker or connection counts. A callee reporting a healthy p99 of 200 ms can still be slow to a caller that only allows it 50 ms.

The p99 only means something against the timeout for that call. 300 ms is healthy inside a 1 s wait allowance on a background job and fatal inside 100 ms on the checkout path. Alert per dependency when the wait starts eating the timeout, and treat the timeouts firing as the confirmed case.

Detect with a trace, not with opinions. End-to-end traces with per-hop durations find the slow service in one look; per-service dashboards invite a debate about whose average looks worse. The argument usually ends when someone shows the trace.

Isolate the wait. A separate pool per dependency (bulkhead: slow drains only its pool), circuit breakers that trip on slow-response ratio, not just errors, and load shedding at the edge when the fleet is saturated. Retrying a slow dependency is adding load to the thing you are waiting on: never.

Absorb by buffering, where the interaction allows it. Convert the sync call to async and the queue absorbs the slowness: the caller is free, and the backlog’s depth and age become the alarm. This converts a latency crisis into a visible, measurable backlog, which is exactly the property you want during an incident.

Degrade around the slow panel. Serve the page without the slow optional dependency, marked, rather than letting it set the page’s latency for everyone.

Ideas worth mentioning out loud

Follow-ups to expect

Red flags in an answer

Sources