A personal learning write-up. The pattern below is drawn from an incident review I studied, retold as a generalised case. The company, the services, the people, the dates, the times and the numbers have been removed or replaced with descriptions of their shape. The mechanisms are what I want to share.
One afternoon, a service that most engineers at the company had never heard of ran out of CPU.
It was an MCP server: the component that lets AI assistants read and act on a user's data after the user grants consent. It was a mid-tier service with no published service-level objectives. Nothing about it suggested that, well under an hour later, token refresh would start failing for an external partner, another product would start throwing 500s on sign-in, and third-party apps would time out trying to find out which sites a user could see.
The service that owned those failures, the OAuth token service, is top tier. It had dashboards. It had alerts. Through most of the incident, its latency chart looked normal and the large majority of its responses were logged as 2xx.
The callers saw something else: a high error rate, waits that ran all the way to their client timeouts, and a growing number of sockets they had given up on.
This post is about the gap between those two views, why it exists in a lot of services that are instrumented exactly the way their platform recommends, and the question the review ended on: from whose perspective should we measure whether a service is working?
The system as it stood
Six components matter for this story. Step through the cascade below, or open it full screen. Click any node for what it saw and what changed.
- The token service. A Spring Boot application on Tomcat. It issues and refreshes OAuth tokens, runs the authorisation and consent flow, and tells integrations which sites a token can reach. Top tier. Every product and every third-party integration depends on it.
- The MCP server. Handles the Model Context Protocol conversation with AI assistants. When an assistant connects on a user's behalf, it sends the user through the token service's consent flow, and the token service calls the MCP server back as part of that flow. Mid tier.
- The access facade. Answers the question "which sites and products can this principal see?" for site pickers, consent screens, app installs and mobile login. It is a public API, so third-party developers call it directly as well.
- The gateway. An internal API gateway in front of the identity services. Among other things, it applies per-caller rate limits.
- The permissions service and its database. The facade's main dependency. The read replica in the busiest region was close to the largest size available.
- The callers. An external partner's identity service refreshing tokens. Another first-party product. Third-party apps on the developer platform. Mobile apps. And, on the other path, a large population of AI agents.
Two request paths share this system. Path A is an AI agent asking for consent: agent to token service to MCP server, with a side trip through the access facade to render the site picker. Path B is everyone else refreshing a token or asking which sites they can see: caller to token service, sometimes through the facade to permissions.
The two paths share a Tomcat worker pool in the token service and a rate limit on the permissions endpoint at the gateway. Nothing in the architecture made that sharing visible, and nothing in the metrics made it measurable.
Four acts
Act 1. The MCP server runs out of CPU. It had been unstable for a little while and the owning team was still chasing the cause. For the purposes of this story, the cause does not matter. A dependency went unhealthy during business hours in a busy region. That happens.
Act 2. The agents retry. When a human fails to complete a consent screen twice, they stop and ask someone. An AI agent does not. It runs its loop again. Across every assistant connected to the MCP server, failed consents turned into retried consents, immediately and continuously. Traffic to the authorisation and consent endpoints climbed. Each of those requests held a Tomcat worker thread while the token service waited on the unhealthy MCP server.
The first alert fired within minutes. It was an error-rate alert on the identity side, and it was correctly attributed to the MCP outage, which already had its own incident open. From the token service's perspective, this was a noisy dependency, not a problem of its own.
Act 3. The rate limit trips. The consent flow needs the site picker, so the token service also called the access facade more often, and the facade called the permissions service through the gateway more often. The gateway enforces a per-caller limit on that endpoint. Demand reached a multiple of it. Rejections outnumbered the requests the limit let through. The facade's site-discovery endpoint failed most of the time, and because the limit is keyed on the caller, not on the caller plus the endpoint, every other facade endpoint that touched permissions failed with it: legacy and modern site pickers, mobile login policy, site discovery for integrations. All public APIs.
Here is the part that turned a dependency problem into a shared-resource problem. On a 429 from the facade, the token service retried until its own timeout expired rather than failing fast. A meaningful share of the demand at the gateway was those retries. So the token service was now holding worker threads waiting on two unhealthy dependencies, and generating a share of the load that was making one of them unhealthy.
Act 4. The pool is empty. Every worker thread in the token service was blocked on either the MCP server or the facade. New requests, including token refreshes from callers who had nothing to do with AI agents or site pickers, waited in Tomcat's accept queue until the caller gave up. The partner's identity service, with a short client timeout, saw a large fraction of refreshes fail. The other first-party product saw a spike in 500s on sign-in. The token endpoint lost a significant slice of its reliability for the incident window, and the facade failed the majority of its requests.
The incident for the token service was opened from the partner's side, because what the partner was seeing did not match what the service was reporting.
Recovery. A redeploy of the MCP server ended the trigger. Retry pressure fell within minutes, threads freed, and most token-service endpoints recovered quickly. The gateway limit took longer to clear. As a precaution the team raised the limit, at a real daily cost in additional permissions capacity, and the permissions team accepted it only as an emergency measure, because the database behind it had little headroom left. The limit was never really the gateway's number. It was the database's.
What the service said about itself
If you only had the token service's own telemetry, you would have seen the error rate climb once the pool was exhausted and attributed it to a loud, already-known dependency outage. You would not have seen the thread pool filling up in the half hour before that, which was the only signal that would have let someone act before the blast radius jumped from "AI consent" to "every OAuth capability". And you would have undercounted the damage once it happened. Two defaults are responsible.

Latency did not include the queue. Spring Boot's request metrics start timing when the request enters the servlet filter chain, which is after a Tomcat worker thread has picked it up. Time spent in the connector's accept queue is never measured. Under normal load that time is microseconds and nobody cares. When the pool is exhausted, the queue is where all the latency lives. A request that waited many seconds for a thread and then took a fraction of a second to execute was recorded as a fraction-of-a-second request. The p99 chart was telling the truth about the part it could see.
The fix is small once you know you need it. The sidecar proxy in front of the application already knows when a request arrived. It can stamp that time onto the request, and the application can measure from the stamp rather than from filter entry. Queue time becomes a first-class series, and it goes into the SLO reading rather than beside it.
Disconnected clients were counted as success. When a caller's timeout fires, the caller closes the socket. The request is still in the queue or still executing. Eventually a worker thread picks it up, does the work, and writes a 200 to a socket nobody is reading. Tomcat may surface that as a client-abort exception on the write, or may not, depending on timing. Either way the metrics filter recorded the status the service intended to send, and that was 2xx.
From inside the container, the partner requests that timed out looked like successes with an unusual write error rate. The convention nginx popularised, status 499 for "client closed request", exists precisely for this. Record it, and count a 499 as an SLO miss whenever the disconnect happened after the SLO's latency target. The service did not meet its target, so the client left. The client was right.
Noise hid the signal. A third factor is not a metric defect but an alerting one. The MCP dependency was failing loudly, and the token service's error logs and alerts were full of it. The quieter signal, worker-pool saturation across the fleet, had no alert of its own. The fix is an alert that looks at saturation across all hosts for a sustained period, because a short spike on one node does not warrant a page.
Three vantage points
A good severity review does not re-litigate root causes; the post-incident review already did that. It asks what pattern the incident exposed that other teams probably share. The pattern here is that the service was instrumented the way the platform recommends, and that instrumentation was structurally unable to see the failure mode that mattered. So the question that went to the room was: where should the counters live?

| Inside the container | At the sidecar proxy | At the caller | |
|---|---|---|---|
| Sees queue wait | No, unless the arrival time is stamped upstream | Yes | Yes, as part of total latency |
| Sees client disconnect | Only with deliberate handling | Yes, it owns the socket | Yes, it is the one disconnecting |
| Sees retries as retries | No | Egress side can, if it does the retrying | Yes |
| Matches what the caller experienced | Approximately, if instrumented correctly | Closely, minus the network between proxy and caller | Exactly |
| Who does the work | Every service team, per framework, per version | Platform team, once | Every consumer, per integration |
| Can be wrong without anyone noticing | Yes, and it was | Less so; one implementation, widely exercised | Rarely, but every caller measures differently |
| Standardised SLO reporting | Only by convention | Yes, by construction | No |
Three observations came out of the discussion.
First, the container view is the cheapest to build and the easiest to get silently wrong. Both defects above live in the kind of shared starter library that most JVM services at a company inherit. Fixing them in the library fixes them for everyone, which is good, and the fact that they can sit there for years without anyone noticing is the point.
Second, the caller view is the only one that is true by definition, and many companies already have it for products. Client-side experience telemetry records whether a user's action succeeded, from the browser or mobile app, and that is what drives automated incident detection for user-facing products. It did not help here because a token refresh from a partner's backend has no browser at the end of it. The callers were machines.
Third, the proxy view is the one that nobody owns yet and that would have told the truth here. The sidecar proxy's ingress already terminates the connection, already sees the queue wait between accepting the request and the application answering, and already knows when the client went away. Per-route success and latency counters at that layer would give a reliability number that is the same shape for every service, independent of framework, and that can include retries when the egress side does the retrying. It is the kind of change that needs a platform team to agree that it is their problem, which is exactly what a severity review is for.
Why agentic callers change the answer
Most of this post would read the same if the retrying callers had been browsers. Retry storms are not new. Two things about this one are.
The callers do not get tired and do not complain. Human-driven traffic has natural back-pressure. People give up, go for coffee, file a ticket. An agent that has been told to connect to a user's workspace will try again as fast as its loop allows, for as long as it is running, and there is often no human watching the attempt. The service sees a flat wall of demand with no decay. The signal that a human would have provided, a complaint, arrived from a partner's engineer looking at their own dashboards, long after the pool had filled.
Attribution by client does not work. AI assistants register with the token service through dynamic client registration. Many client IDs, one behaviour. A rate limit keyed on client ID sees many well-behaved callers. The fix that shipped first was to classify clients into profiles, such as "MCP client", "dynamically registered third party" and "command-line tool", and to apply token buckets per profile, so one profile saturating cannot take the pool from the others. That is also the unit at which they are now measured. The question of whose perspective counts gets sharper when a whole class of callers has no perspective of its own: there is no user to notice, so the measurement has to notice for them.
There is a tiering question underneath this. A top-tier service's consent flow is now coupled to a mid-tier service with no SLOs. Either the mid-tier service grows SLOs that the top-tier service can depend on, or consent for AI clients is designated a lower-criticality capability inside the token service, with its own bulkhead and its own budget. Both are better than the arrangement the incident found, which is that the coupling exists and nobody has written it down.
What the fixes look like
In the token service: per-profile rate limiting. Concurrency limits on every outbound HTTP client, so a slow dependency can exhaust its own bulkhead and not the main worker pool. A fleet-wide worker-pool saturation alert. Queue time recorded and included in latency and SLO readings. Status 499 for client disconnects, counted as an SLO miss past the latency target. Dependency calls moved onto the sidecar's egress so that dependency traffic and failure are visible in a standard place.
In the facade: caller-plus-endpoint rate limits, so one caller's burst on one endpoint cannot fail every endpoint for every caller. Load shedding by capability tier.
In the platform: the emergency limit increase goes back once the above is in place, because it was always borrowed against a database that cannot grow. The token service spreads across more regions so that permissions traffic is not concentrated in one. And the proposal for per-route reliability counters at the proxy ingress gets an owner and a date to come back with a yes or a no.
What I would tell another team
- Check where your latency clock starts. If it is in the application, you cannot see your own queue.
- Check what you record when the client leaves. If it is the status you meant to send, your success rate is a measure of your intentions.
- Check which of your dependencies are allowed to fire your alarms. A loud dependency hides a quiet exhaustion.
- Find the shared resources that two unrelated request paths depend on. Then ask whether a caller on one path could ever be an agent in a loop.
- Ask, before the incident rather than after, whose perspective your SLO is written from. In this case it was written from inside the container. The container thought it was doing fine.
Deepak Biswas is a senior engineering reliability leader working on automated incident detection, impact measurement, resiliency testing and disaster-recovery orchestration. More at https://biswas-ai.com. This article reflects personal learning and opinion, not the position of any employer.

