Scrivio Interview library
ScenarioAdvanced7 min read · updated 12 November 2026

End-to-end latency through a chain of seven services has grown slowly over a year and no single team sees a problem in its own service. How would you lead the investigation across teams?

I would make the drift visible end to end first: use distributed tracing to build a per-hop latency breakdown of the main user journeys and compare it with a year ago, which usually shows added synchronous calls, extra retries, larger payloads and chatty call patterns that each team introduced for good reasons. Then I would form a time-boxed working group with one representative per team and a shared goal, agree latency budgets per hop so each team has a clear target, fix the largest contributors first, and add regression checks so slow drift is caught at the next release instead of the next year.

Why this question is asked

Slow drift is harder than a sudden regression. Nothing broke on any particular day; every team's dashboard looks normal; each change added 20 or 50 milliseconds and looked harmless. But seven services in a chain add up, and a year later the user journey is twice as slow and nobody owns the problem. Interviewers ask this at the senior level because the fix is as much about leadership as about profiling: making a shared problem visible, giving it an owner and a target, and changing the process so it does not come back. In this answer, we will see why no single team notices, build the per-hop breakdown, look at the typical causes, set budgets, organize the cross-team work, and stop future drift.

1Why No Single Team Sees a Problem

Each team watches its own service's latency, usually measured from the moment a request arrives to the moment it responds. That number includes the time spent waiting on the services it calls, so it can grow because of a downstream, and teams learn to ignore what they do not own. Worse, a team's own share may really be stable while the chain grows because of how services call each other: one more call per request, a retry, a payload that doubled.

Also, percentiles do not add up neatly. If seven services each have a p99 of 100 ms, the journey's p99 is not 700 ms; it is often worse, because a request that happens to hit a slow instance in any one hop is slow overall. The more hops, the more likely a user meets at least one slow one. So the right unit of analysis is the user journey, not the service.

2Building a Per-Hop Latency Breakdown

Distributed tracing gives us the journey view. We take the main user journeys, such as checkout or search, and from traces compute, for each hop, its own time, called self time, excluding time spent waiting on children, and the time spent in calls to each child. Most tracing backends can aggregate this across many traces for a given root endpoint. We compare the current breakdown with one from a year ago. If traces are not kept that long, we use what we have: per-service metrics history, client-side call timers such as http.client.requests, and release notes to date the changes.

Checkout journey p95 by hop, a year apart
HopA year agoNowWhat changed
API gateway -> checkout40 ms45 mslittle
checkout -> cart60 ms140 mscart response grew from 20 KB to 400 KB
checkout -> pricing80 ms210 mspricing now calls promotions per line item
checkout -> fraud (new)-180 msnew synchronous call added in spring
pricing -> tax50 ms120 msretry on timeout, 2 attempts at p95
Journey total420 ms860 msfive changes, none alarming alone
Illustrative numbers; the point is that the delta spreads over several hops.

Seen this way, the drift has a shape. No hop doubled its own work; the growth came from interactions: a new call, a fan-out, a retry, a bigger payload.

3The Usual Causes of Slow Drift

Four patterns explain most cases. Added synchronous calls: a fraud check, a feature flag lookup, an audit call added inline instead of asynchronously, each adding its full latency to the critical path. Extra retries: a retry policy added to hide occasional timeouts turns a slow call into a call that takes twice the timeout at the tail, and retries at several layers multiply. Larger payloads: responses grow as fields are added, and serialization, transfer and parsing time grow with them. Chatty patterns: a service that once made one batched call now makes one call per item, so latency scales with the size of the cart.

Each of these was a reasonable local decision. That is why blame is useless here and why the fix needs agreement across teams.

4Organizing the Work Across Teams

A problem everyone shares is a problem nobody owns, so we create an owner: a time-boxed working group, for example six weeks, with one engineer from each of the seven teams, a sponsor who can protect their time, and a single shared goal stated as a user-facing number, such as bringing checkout p95 from 860 ms back under 500 ms. The group meets briefly each week, reviews the breakdown, and picks the next fixes.

To give each team a clear target, we agree latency budgets per hop. We start from the journey target and divide it among the hops according to what each needs, leaving a margin. A budget turns "make it faster" into "pricing's call must stay under 120 ms at p95", which a team can plan for and test against.

Step throughLeading the investigation
  1. Pick the main journeyscheckout, search
  2. Per-hop breakdown from tracescompare with a year ago
  3. Working group, one per teamsix weeks, one shared goal
  4. Agree budgets per hopfrom the journey target
  5. Fix largest contributors firstasync calls, batching, payloads, retries
  6. Add regression checksbudgets in tests and alerts

6 steps in order. Play them, or step through them one at a time.

5Fixing the Largest Contributors First

We rank the changes by how much they contribute and how hard they are to fix, and start at the top. Typical fixes are moving the new fraud check off the critical path, for example running it in parallel with pricing or asynchronously with a later hold on the order; replacing per-item promotion calls with one batch call; trimming the cart response to the fields checkout uses, or adding a slimmer endpoint; and replacing blind retries with a single retry using a short timeout and a budget, or a hedged request at the tail. Each fix is measured on the journey, not just on the service, so the group sees the shared number move.

Java
// before: two calls in sequence, about 210 + 180 ms on the critical path
Price price = pricing.quote(cart);
FraudResult fraud = fraudClient.check(cart);
// after: run them concurrently, wait for both; about max(210, 180) ms
CompletableFuture<Price> p = CompletableFuture.supplyAsync(() -> pricing.quote(cart), executor);
CompletableFuture<FraudResult> f = CompletableFuture.supplyAsync(() -> fraudClient.check(cart), executor);
CompletableFuture.allOf(p, f).orTimeout(500, TimeUnit.MILLISECONDS).join();
Price price = p.join(); // already complete
FraudResult fraud = f.join(); // about 180 ms saved at p95

6Stopping the Drift From Coming Back

Without regression checks, the chain drifts again. The budgets become alerts on each hop's p95 against its budget, and an alert on the journey target itself. Performance tests in the delivery pipeline run the main journeys against a production-like environment and fail or warn when a hop exceeds its budget. Design reviews ask one more question for any new synchronous call on a critical journey: what does it cost, and does it fit the budget? And the per-hop breakdown becomes a monthly report, so a 30 ms increase is discussed when it happens, not a year later.

7Follow-up questions

What if some teams do not have tracing in their services?

Then adding it is the first task of the working group, because without it we are guessing. The OpenTelemetry Java agent or Micrometer Tracing in Spring Boot can be added with little code, and context propagation through HTTP headers connects the hops. In the meantime, client-side timers in each caller give the duration of each call, which is enough for a first breakdown.

How do you set a budget for a hop that is already over it?

We set the budget from the journey target, not from the current value, and agree a date for meeting it. Until then, the alert threshold is the current value, so it catches further growth, and the team's plan shows how it will get to the budget.

Why time-box the working group?

A permanent group becomes a place problems are sent to instead of being owned. Six weeks with a clear goal creates focus and urgency; at the end, the budgets and regression checks hand ownership back to the teams.

8Conclusion

In this answer, we saw that slow drift across seven services hides because each team watches its own latency while the chain grows through interactions. A per-hop breakdown from traces, compared with a year ago, exposes added synchronous calls, extra retries, larger payloads and chatty patterns. A time-boxed working group with a shared goal and per-hop latency budgets turns it into work teams can own, the largest contributors are fixed first, and budget alerts, journey performance tests and design reviews keep the drift from coming back.

What to say in the interviewAbout 100 seconds aloud

Open with

First I would make the problem visible as a journey rather than as seven services. Using distributed tracing, I would build a per-hop latency breakdown for the main user journeys, like checkout, showing each hop's own time and the time spent calling others, and compare it with a year ago, using metrics history and release notes if traces do not go back that far.

Then, if they want more

In my experience the drift comes from interactions, not from one slow service: new synchronous calls added inline, retries that double the tail, payloads that grew from kilobytes to hundreds of kilobytes, and chatty patterns like one call per cart item. Each was reasonable locally, so this is not about blame.

Then I would give the problem an owner: a time-boxed working group, say six weeks, with one engineer from each team, a sponsor to protect their time, and one shared goal, such as checkout p95 back under 500 milliseconds.

We would agree latency budgets per hop derived from that target, so each team has a concrete number it can plan and test against. We would fix the largest contributors first: run independent calls in parallel or move them off the critical path, batch the per-item calls, trim payloads, and replace stacked retries with one retry and a tight timeout.

Every fix is measured on the journey. Finally, to stop it happening again, the budgets become per-hop alerts, journey performance tests run in the pipeline, design reviews ask about any new synchronous call, and the breakdown is reviewed monthly.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "End-to-end latency through a chain of seven services has grown slowly over a year and no...": https://scrivio-interview-library.netlify.app/spring-boot/service-performance/fdf4e5b8b0/