Scrivio Interview library
LeadershipAdvanced5 min read · updated 12 November 2026

Your platform has client-side load balancing and retries in Java libraries, and a mesh is being introduced. How would you decide which concerns live in the application and which in the platform?

I would split concerns by whether they need business context. Anything that depends on what a call means, such as idempotency, fallbacks and which calls may be retried, stays in the application; uniform transport concerns such as mTLS, basic load balancing, connection-level retries and traffic shifting move to the platform. I would write the ownership of each concern down so nothing is done twice or not at all, migrate in stages while comparing behaviour with observability, and keep one source of truth for timeouts so that they nest correctly between the application and the mesh.

Why this question is asked

Introducing a service mesh into a platform that already has client-side load balancing and retries in Java libraries creates an awkward period where two systems can do the same job. Done carelessly, retries double, timeouts conflict and incidents become harder to explain. Interviewers ask this leadership question to see whether we can draw a clear line between application and platform responsibilities and lead a migration across many teams safely. In this answer, we will look at the principle for splitting concerns, apply it concern by concern, see why written ownership matters, plan a staged migration, and finish with the special problem of timeouts.

1The Principle: Business Context Decides

A mesh proxy sees every request but understands none of them. It knows the method, path, headers and status code. It does not know that POST /payments moves money, that a missing recommendation can be replaced with an empty list, or that a user's checkout has 2 seconds left. The application knows all of that.

So the line is simple to state. Concerns that are the same for every call, and need no knowledge of what the call means, belong in the platform, where they are applied uniformly to every service in every language. Concerns that depend on meaning belong in the application, because only it can make the right decision.

2Applying It Concern by Concern

Most concerns fall clearly on one side. Mutual TLS, certificates and their rotation are uniform and painful to do in every library, so the mesh takes them. Basic load balancing and outlier ejection (removing an instance that keeps failing) are uniform too. Connection-level retries, retrying a request that failed because the connection broke before anything was sent, are safe for any method and fit the platform. Traffic shifting for canary releases and fault injection for testing are platform features by nature.

The application keeps idempotency keys, fallbacks and degraded responses, the decision of which business operations may be retried after a response timeout, deadlines derived from the user's request, and circuit breakers whose open state should trigger a business fallback. Some concerns, such as observability, are shared: the mesh gives uniform golden metrics, and the application adds business context to traces.

Who owns what after the mesh arrives
ConcernOwnerReason
mTLS and certificate rotationplatformuniform, hard to do per library
Basic load balancing, outlier ejectionplatformsame for every call
Connection-failure retriesplatformsafe for any method
Retries after a response timeoutapplicationneeds idempotency knowledge
Idempotency keys and fallbacksapplicationbusiness meaning
Deadlines and timeoutsapplication sets, mesh capsone source of truth, must nest
Traffic shifting, fault injectionplatformrelease and testing tools
Metrics and tracesbothmesh for uniform metrics, app for context
Written down and published so no concern is done twice or not at all.

3Why Ownership Must Be Written Down

Without a written ownership table, each team decides for itself. One team removes its Spring Retry configuration because "the mesh does retries", while the mesh team configured no retries because "applications know best", and now nobody retries anything. Another team keeps its three retries and the mesh adds three more, and the dependency sees nine attempts per call during an outage.

So the table above, or our version of it, is published as a platform decision, with the reasoning, and reflected in the company client starter and the mesh's default configuration. When the starter detects that it runs inside the mesh, it can disable its own load balancing and connection-level retries automatically, so teams do not have to remember.

4Migrating in Stages With Observability

We move in stages, a few services at a time, starting with low-risk internal ones. For each stage we record baseline metrics before the change: request rate, error rate, latency percentiles and retry counts per dependency. Then we enable the mesh for those services with the platform features on and the duplicated library features off, and compare. If the error rate or p99 changes, we investigate before moving on. The mesh's own metrics make the comparison easier, because they show every call between services the same way.

Client-side load balancing libraries are removed last, once the mesh has proven itself, so we can roll back by turning the sidecar off.

Step throughMoving one group of services onto the mesh
  1. Record baseline metrics per dependency
  2. Enable sidecars; turn off duplicated library featuresload balancing, connection retries
  3. Do errors, p99 and retries match the baseline?
    YesNext group of servicesNoInvestigate, roll back if needed
  4. Remove client-side balancing libraries last

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

5One Source of Truth for Timeouts

Timeouts deserve special care because two layers now enforce them. If the application allows 2 seconds for a call and the mesh route has a 1 second timeout, the mesh cuts calls off early and the application sees confusing 504 errors from its own proxy. If the mesh allows 15 seconds and the application 2, the mesh timeout is useless. Timeouts must nest: the application, which knows the deadline, sets the per-call timeout, and the mesh holds a slightly larger cap as a safety net.

To keep that true over time, we keep one source of truth, for example per-dependency timeout values in the service's configuration, from which both the Spring client settings and the mesh route configuration are generated. Changing a timeout then changes both, and a check in the pipeline fails if a mesh timeout is smaller than the application's.

6Follow-up questions

Should circuit breakers move to the mesh?

Partly. Mesh outlier ejection protects against one bad instance, which is uniform and fits the platform. But a breaker whose open state should show a fallback, such as cached prices, needs to be in the application, because the mesh can only return an error. Many organisations keep both, with clearly different jobs.

What if some services cannot run a sidecar?

Then they keep the library features, and the ownership table says so for them. The starter should support both modes: inside the mesh it disables duplicated features, outside it enables them.

How do you get teams to follow the split?

By building it into the defaults rather than asking. The starter detects the mesh and configures itself, the mesh's default policy matches the table, and a pipeline check flags duplicated retries. Teams only need to act when they want something different.

7Conclusion

In this answer, we split concerns by whether they need business context: idempotency, fallbacks and decisions about which calls to retry stay in the application, while mTLS, basic load balancing, connection-level retries and traffic shifting move to the mesh. We wrote the ownership down and built it into the starter and mesh defaults so nothing is done twice or not at all, migrated in stages with baseline metrics to compare behaviour, and kept a single source of truth for timeouts so that application and mesh timeouts always nest.

What to say in the interviewAbout 90 seconds aloud

Open with

My rule is that anything that needs to know what a call means stays in the application, and anything uniform goes to the platform. The mesh sees methods and status codes, but it does not know that a POST moves money or that recommendations can fall back to an empty list.

Then, if they want more

So idempotency keys, fallbacks, which business calls may be retried after a timeout, and deadlines stay in the app. mTLS and certificate rotation, basic load balancing and outlier ejection, retries of connection failures, canary traffic shifting and fault injection move to the mesh.

Then I would write that down as an ownership table and build it into the defaults, so the company starter turns off its own load balancing and connection retries when it runs in the mesh. Without that, you either get nobody retrying or retries multiplying between layers.

I would migrate a few services at a time, record baseline error rates, p99 and retry counts per dependency first, and compare after each step, removing the old client libraries last so we can roll back.

And for timeouts, which both layers enforce, I would keep one source of truth in configuration that generates both the Spring client timeout and a slightly larger mesh cap, with a pipeline check that the mesh never cuts in before the application.

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 documentation below. 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 "Your platform has client-side load balancing and retries in Java libraries, and a mesh...": https://scrivio-interview-library.netlify.app/spring-boot/http-clients/e4c178153a/