Scrivio Interview library
LeadershipPrincipal6 min read · updated 12 November 2026

Java concurrency models for servers have shifted from thread pools to asynchronous callbacks, to reactive streams, and now to virtual threads. How should a long-lived organisation make concurrency-model choices so that each shift does not require rewriting its services?

We keep business logic free of concurrency-model types and confine Mono, Flux, CompletableFuture or executors to thin adapters at the edges, so a change of model replaces adapters rather than the domain. We default to the platform's standard model, adopt a new one only for a proven need, and track how much code depends on each model because that is the cost of the next shift. We also expect platform changes like virtual threads to remove the reasons for library-level models, and we treat the concurrency model as a strategic decision with an owner and a regular review.

Why this question is asked

Java servers have changed their concurrency model roughly every decade: thread pools with blocking I/O, then callbacks and futures, then reactive streams, and now virtual threads. Each shift promised better scalability, and each left behind services written in the old style that someone had to maintain or rewrite. An organisation that keeps services for ten or fifteen years will see the next shift too. Interviewers ask this at the most senior level to see whether we can turn that history into a durable policy. In this answer, we will recap the shifts and what each cost, then go through the design rule that limits the blast radius, the default-first adoption rule, how to measure dependence on a model, and how governance keeps the decision honest.

1A Quick Recap of the Shifts and What They Cost

Each model solved the limit of the previous one. Thread-per-request with blocking I/O was simple, but platform threads cost about a megabyte of stack each, so a server topped out at a few thousand concurrent requests. Callbacks and CompletableFuture avoided waiting threads but made code hard to follow and errors hard to trace. Reactive streams, through RxJava and Reactor, added composition and backpressure, at the price of a new programming model that changes method signatures, debugging, testing, transactions and thread-local context. Virtual threads, final in Java 21, made blocking cheap again, which removed the main reason many services had for going reactive.

The cost of each shift was proportional to how far the model had spread. Where Mono appeared in every service, repository and test, leaving reactive meant touching everything. Where it stayed in the web layer and the clients, leaving it was a few weeks of work.

How each model spreads through code
ModelWhat it changesTypical spread
Thread pools, blocking I/Onothing in signatureslow: executors in config
Callbacks and futuresreturn types become futuresmedium: async APIs leak inward
Reactive streamsevery signature, tests, contexthigh: Mono and Flux everywhere
Virtual threadsnothing in signatureslow: a runtime setting
The cost of the next shift is the spread of the current model.

2Keep Business Logic Free of Concurrency Types

The main design rule is the one from hexagonal architecture: the domain sits in the middle and talks to the outside through ports, interfaces it owns, while adapters at the edges implement them with whatever technology is in fashion. If the domain's methods take and return plain values, the concurrency model lives only in the adapters and the web layer.

Java
// Domain: no Mono, no Future, no executor
public final class PricingPolicy {
public Quote quote(Order order, Price price, Discount discount) { ... } // pure, easy to test
}
// Edge adapter for a reactive web layer
Mono<Quote> quote(Order o) {
return Mono.zip(prices.find(o.sku()), discounts.find(o.customer()))
.map(t -> policy.quote(o, t.getT1(), t.getT2()));
}
// Edge adapter for MVC on virtual threads: the same policy, unchanged
Quote quote(Order o) { return policy.quote(o, prices.findBlocking(o.sku()), discounts.findBlocking(o.customer())); }

Notice that PricingPolicy does not change between the two adapters. If the organisation moves from reactive to virtual threads, or to whatever comes next, the rule engine, which holds most of the value and most of the tests, is untouched. This is not free: it adds a little mapping code at the edges, and in streaming services some logic genuinely belongs in the pipeline. But for the core of most business systems it is a cheap insurance policy.

3Default to the Platform, Adopt New Models for Proven Needs

The second rule is that the default model is the platform's standard one, today plain blocking code on virtual threads with Spring MVC. A team that wants a different model writes a short design note showing the need with numbers, for example 20,000 concurrent streaming connections or a fan-out of 50 calls per request, and shows that the default cannot meet it. This is not hostility to new ideas. It ensures the cost of a model that spreads through code is paid only where the benefit is real, instead of being adopted company-wide because it was the trend.

We also expect the platform to keep moving. Structured concurrency and scoped values, still being refined in recent Java releases (check your version for their status), will cover more cases that once needed libraries. A model that solves a gap in the platform is a bet that the gap stays open, and Loom showed that such gaps can close.

4Track How Much Code Depends on a Model

What we do not measure we cannot plan. A simple quarterly report counts, per service, the files and public methods whose signatures use Mono, Flux, CompletableFuture or callback types, and whether those types appear in domain packages or only in adapters. ArchUnit rules can enforce the boundary: domain packages may not import reactor.core or java.util.concurrent types used for async results. The report turns a vague worry into numbers, such as 14 services reactive with domain spread, 30 with adapter-only use, which tells leaders what the next shift will cost and where to start.

Step throughReviewing a request to adopt a new concurrency model
  1. Team proposes a new modelwith a design note
  2. Does the default model fail a measured need?
    YesContinue the reviewNoStay on the default
  3. Can it be confined to adapters?
    YesApprove with ArchUnit boundary rulesNoApprove only with an exit plan
  4. Record it in the dependency reportowner, services, spread
  5. Review yearlyis the reason still valid?

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

5Make It a Strategic Decision With an Owner

Finally, the concurrency model is treated like a database or a cloud provider choice: a strategic decision with a named owner, usually the platform or architecture group, written down with its reasons and reviewed every year or when the platform changes. The review asks whether the reasons for each non-default model still hold. When virtual threads arrived, an organisation with such a review would have asked within a year which reactive services still needed reactive, and moved the others back gradually, starting with those where the model had stayed in the adapters and the move was cheap.

6Follow-up questions

Isn't confining reactive types to adapters losing the benefits of reactive?

For request-response services, very little is lost: the non-blocking benefit comes from the I/O at the edges, and the domain computation in the middle is synchronous CPU work anyway. For true streaming pipelines, where the stream itself is the business logic, reactive types do belong deeper, and the design note should say so.

Should we rewrite reactive services now that virtual threads exist?

Not by default. A working reactive service with healthy metrics and a team that knows it can stay. We move services back when they need significant change anyway, when they are hard to staff or debug, or when the measurements show no benefit, starting with those where the reactive code is confined to the edges.

How do you keep teams from treating the default as a rule against innovation?

By making the exception path cheap and fast: a one-page design note and a review within a week. Teams with a real need get approval quickly, and the organisation learns from each exception. The default exists to prevent accidental spread, not to forbid choices.

7Conclusion

In this answer, we saw that every concurrency-model shift was expensive in proportion to how far the old model had spread through code. We limited that spread by keeping business logic free of Mono, Flux, futures and executors, confining them to adapters and enforcing the boundary with ArchUnit. We made the platform's standard model the default, adopted new ones only for measured needs, tracked dependence on each model in a regular report, expected the platform to close gaps that libraries fill today, and gave the decision an owner and a yearly review.

What to say in the interviewAbout 100 seconds aloud

Open with

Looking at the history, thread pools, then callbacks and futures, then reactive streams, now virtual threads, the thing that made each shift expensive wasn't the new model, it was how far the old one had spread.

Then, if they want more

Where Mono was in every repository, service and test, leaving reactive meant touching everything. So my main rule is to keep business logic free of concurrency-model types. The domain works on plain values, behind ports, and Mono, Flux, CompletableFuture or executors live only in adapters at the edges, the web layer and the clients.

I'd enforce that with ArchUnit rules, so a pricing policy is the same class whether it's called from a reactive adapter or from MVC on virtual threads.

Second, the default is the platform's standard model, today blocking code on virtual threads, and a team that wants something else writes a short design note with a measured need, like tens of thousands of streaming connections, and ideally shows it can stay in the adapters.

Third, I'd track how much code depends on each model, a simple quarterly count of signatures using async types and where they appear, because that number is the cost of the next shift. Fourth, I'd expect platform changes to keep removing reasons for library-level models; Loom did that for reactive, and structured concurrency may do more.

And finally I'd treat the concurrency model as a strategic decision with an owner and a yearly review that asks whether each exception still has a reason, so moves happen gradually instead of as big rewrites.

About this answer

Last updated
12 November 2026
Versions it names
Java 21
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 "Java concurrency models for servers have shifted from thread pools to asynchronous...": https://scrivio-interview-library.netlify.app/spring-boot/reactive-fundamentals/3399948fdc/