Scrivio Interview library
LeadershipPrincipal6 min read · updated 12 November 2026

Utilities such as Spring Retry, @Async executors and resource loading are often copied between services with small differences. How do you decide what the platform should own and what teams should own?

The platform should own the defaults that decide reliability and safety, such as executors, retry policies, timeouts and context propagation, because a mistake there causes incidents in every service. Teams should own the business choices only they can make, such as which operations are idempotent and safe to retry. The platform delivers its part as a starter with clear override points rather than mandatory wrappers, measures adoption and incidents to decide when a default should become a rule, and prefers framework built-ins, such as Spring Framework 7's retry support, over in-house libraries whenever they cover the need.

Background to this question

Copy-pasted utilities are a quiet form of technical debt. Each copy starts identical, then one team fixes a bug in its version, another changes a timeout, and two years later 40 services have 40 slightly different retry helpers and nobody knows which one caused last night's outage. A leader is asked this question to see whether they can draw a boundary that teams accept, not just whether they can write a shared library. In this answer, we will look at the test for what the platform should own, the business decisions that must stay with teams, how to deliver defaults without forcing them, how to decide when a default becomes a rule, and why the framework should usually win over our own code.

1The Test: Who Pays When It Is Wrong?

A useful way to draw the boundary is to ask who pays for a wrong choice, and whether the right choice needs business knowledge. An unbounded executor queue, a missing HTTP timeout or a retry policy without backoff causes incidents whose cost spreads to other services: a retry storm hits a shared downstream, a hung thread pool breaks a whole call chain. None of these choices need knowledge of the business; they need knowledge of failure modes. That makes them platform concerns.

Whether a particular call is safe to retry is the opposite. It depends on what the call does, which only the owning team knows. A platform that tried to decide it would be guessing.

Who owns what
ConcernOwnerWhy
Executor shapes, bounded queuesPlatformfailure spreads; no business knowledge needed
Retry backoff, jitter, max attemptsPlatform defaultretry storms hurt shared systems
HTTP and DB timeoutsPlatform defaultmissing timeouts hang call chains
Context propagation (trace, MDC, auth)Platformsame everywhere; easy to get wrong
Which operations are idempotentTeamdepends on business semantics
Which errors are acceptable to dropTeamdepends on what the work means
Pool sizes for a specific loadTeam overrideonly the team knows its traffic

2What Teams Must Keep

Teams own the business-specific decisions, and the platform should make those decisions explicit rather than hide them. For retries, that means the platform provides the mechanism and the backoff, but a team has to state that an operation is retryable, for example by annotating it, and has to supply an idempotency key for anything that changes state. For executors, the team chooses whether lost work is acceptable, which decides whether it can use in-memory @Async or needs a durable queue.

Keeping these choices with teams is not just politeness. If the platform made every operation retryable by default, it would quietly turn non-idempotent payment calls into double charges. A good boundary makes the dangerous choice a deliberate act by the people who understand it.

3Deliver Defaults Through a Starter, Not a Wrapper

The platform ships its part as a Spring Boot starter: a jar whose auto-configuration creates the named executors, sets timeouts and retry defaults, and registers context propagation, all backed by properties. Each bean is guarded by @ConditionalOnMissingBean, so a team with a real need can replace one piece without forking the whole thing.

Java
# application.yml of one service: everything else comes from the starter defaults
platform:
executors:
app-async:
queue: 500 # override with a reason: bursty webhook traffic
http:
payments-gateway:
read-timeout: 3s # gateway is known to be slow; default is 2s

The alternative, a mandatory wrapper API such as PlatformExecutor.submit() that every team must use, sounds more controlled but works worse. It adds a layer teams must learn, it falls behind Spring's own APIs, and teams that hit a limitation bypass it, which brings back the copies we wanted to remove. Defaults that are better than what teams would write themselves get adopted without being enforced.

4When a Default Should Become a Rule

Not every default needs enforcing. The way to decide is evidence: measure who overrides what, and which incidents trace back to which choices. The starter can report its effective configuration through a metric or an Actuator endpoint, so the platform can see that 30 services raised the default queue size, which suggests the default is wrong, or that one service disabled timeouts, which is a risk.

Incident reviews supply the other half. When two incidents in a quarter come from services that removed the HTTP timeout, the timeout becomes a rule, enforced by a startup check or an architecture test that fails the build. Rules cost autonomy, so we spend them only where the evidence says the cost of freedom is too high.

Step throughPromoting a default to a rule
  1. Platform ships a defaultwith an override property
  2. Measure overrides and incidentsconfig metric, incident reviews
  3. Many teams override the same way?
    YesChange the defaultNoKeep watching
  4. Incidents caused by overrides?
    YesMake it a rule with a checkNoLeave it a default

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

5Prefer Framework Built-Ins

Every in-house library is a product the platform must maintain, document and upgrade forever. When the framework covers the need, we should use it and contribute configuration rather than code. A concrete example is retry: for years teams used the separate Spring Retry library or wrote their own loops, but Spring Framework 7 added core retry support, a RetryTemplate in org.springframework.core.retry and a @Retryable annotation enabled with @EnableResilientMethods, along with @ConcurrencyLimit. A platform starter should configure those rather than ship a retry helper of its own.

The same applies to executors, where Spring's ThreadPoolTaskExecutor, ContextPropagatingTaskDecorator and Boot's spring.task.execution properties already do most of what custom code used to do, and to resource loading, where Spring's ResourceLoader and ResourcePatternResolver handle classpath and file patterns. In-house code is justified only for what is truly specific to us.

6Follow-up questions

How do you get teams to accept the platform's ownership?

By making the platform path the easiest one and by explaining each default with the incident or measurement behind it. Teams accept a timeout rule much more readily when it comes with the outage it would have prevented. A visible override process also helps, because it shows that the platform listens.

What if a team's override is clearly unsafe?

First talk to the team, because there may be a real need the default does not meet, and the result may be a better default. If the override stays unsafe, document the risk, and if it causes or nearly causes an incident, that is the evidence for turning the default into a rule.

How do you remove the existing copies?

Inventory them, pick the starter version as the replacement, and migrate service by service during normal work, starting with services that have had related incidents. Track the remaining copies as a visible number so the migration finishes instead of stalling at 80 percent.

7Conclusion

In this answer, we drew the line by asking who pays for a wrong choice: the platform owns reliability and safety defaults, teams own business decisions such as idempotency, defaults ship in a starter with clear overrides, evidence from adoption and incidents turns a default into a rule, and framework built-ins such as Spring Framework 7's retry replace in-house libraries wherever they can.

What to say in the interviewAbout 90 seconds aloud

Open with

The test I use is who pays when the choice is wrong, and whether making it needs business knowledge. Executor shapes with bounded queues, retry backoff, timeouts and context propagation cause incidents that spread across services when they're wrong, and they need knowledge of failure modes rather than of the business, so the platform owns them.

Then, if they want more

Whether an operation is idempotent, and therefore safe to retry, or whether losing a task is acceptable, depends on business meaning, so teams own that, and the platform makes them state it explicitly, for example by marking retryable operations and supplying idempotency keys.

I'd deliver the platform side as a Spring Boot starter with defaults in properties and @ConditionalOnMissingBean on every bean, so teams can override one value or replace one bean instead of forking the library. I'd avoid mandatory wrapper APIs, because teams bypass them and the copies come back.

Then I'd measure: the starter reports its effective configuration, so we can see which defaults teams override, and incident reviews tell us which overrides hurt. When many teams override a default the same way, the default changes; when overrides cause incidents, the default becomes a rule enforced by a check.

And I'd prefer framework built-ins, for example Spring Framework 7's core retry and @Retryable, over maintaining our own retry library.

About this answer

Last updated
12 November 2026
Versions it names
Spring Framework 7
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 "Utilities such as Spring Retry, @Async executors and resource loading are often copied...": https://scrivio-interview-library.netlify.app/spring-boot/spring-utilities/7285c4349c/