Quick revision
The short answer
The main lesson is that a programming model is paid for on every line of code by every developer for years, so its benefit must be large and specific to justify it. Reactive stacks delivered real gains for streaming, high fan-out and connection-heavy workloads, but were often generalised to every service, and then Project Loom's virtual threads removed the main reason many teams had adopted them. So we adopt model shifts where the measured benefit is large, keep boundaries that make a later reversal cheap, and follow the industry while deciding from our own load profiles.
What to remember
In this answer, we drew lessons from the reactive wave and the move back to blocking code on virtual threads. A programming model is paid for on every line of code by every developer for years, so its benefit must be large and workload-specific. Reactive delivered for streaming, gateways and high fan-out but was generalised to all services, and Loom then removed the main reason many teams had adopted it. We would adopt future shifts per workload on measured benefit, keep the new model at the edges so reversal stays cheap, and decide from our own load profiles while watching the industry.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
The main lesson is that a programming model is paid for on every line of code by every developer for years, so its benefit must be large and specific to justify it. Reactive stacks delivered real gains for streaming, high fan-out and connection-heavy workloads, but were often generalised to every service, and then Project Loom's virtual threads removed the main reason many teams had adopted them. So we adopt model shifts where the measured benefit is large, keep boundaries that make a later reversal cheap, and follow the industry while deciding from our own load profiles.
Why this question is asked
Between roughly 2017 and 2020, many organisations moved to reactive stacks such as Spring WebFlux and RxJava, encouraged by the promise of handling far more load with fewer threads. A few years later, with virtual threads final in Java 21, a number of them moved services back to blocking code. Interviewers ask senior candidates what they learn from this because the next shift will come, and the useful answer is a way of making such decisions, not a verdict on reactive. In this answer, we will look at why the cost of a programming model is so high, what the benefits really were and where they were over-applied, how the platform changed the equation, and the practices we would keep for future shifts.
1A Quick Recap of What Happened
Reactive programming addressed a real limit. Platform threads are expensive, about a megabyte of stack each and costly to switch, so a thread-per-request server struggled beyond a few thousand concurrent requests. Event-loop servers with non-blocking I/O, in the style of Node.js and Netty, showed that a few threads could handle many more connections. Spring WebFlux, Reactor and RxJava brought that to Java with composable streams and backpressure.
Many organisations then adopted reactive as the standard for all new services. Over time they found the code harder to write, read, test and debug, needed reactive drivers for everything, and saw modest gains for ordinary services. When virtual threads made blocking cheap, the main argument weakened, and some services moved back to Spring MVC on virtual threads.
2A Programming Model Is Paid for on Every Line
A library choice affects the code that calls it. A programming model affects all code: method signatures return Mono and Flux, loops become operators, try and catch become onErrorResume, transactions and security move into Reactor's context, and stack traces show operator internals rather than our methods. Every developer pays that cost on every feature, every code review and every incident, for as long as the code lives.
So the question is never only whether the model is faster. It is whether the benefit, per service, outweighs a permanent tax on development. For a streaming service handling 50,000 open connections, the answer was clearly yes. For a CRUD service handling 300 requests per second against a pooled database, the benefit was small and the tax was the same.
| Workload | Benefit of reactive | Typical outcome |
|---|---|---|
| Gateways and proxies | large: many connections, pure I/O | kept reactive |
| Streaming, SSE, WebSocket | large: backpressure, idle connections | kept reactive |
| High fan-out aggregation | medium to large | often kept, some moved |
| CRUD on a relational database | small: pool-bound | often moved back |
| Internal admin and batch APIs | none | moved back or never needed it |
3The Platform Removed the Reason
Project Loom took a different route to the same goal. Instead of asking developers to stop blocking, it made blocking cheap: a virtual thread that waits on I/O is unmounted from its carrier thread and costs a few kilobytes. Imperative code, JDBC and thread-locals keep working, and a server can hold tens of thousands of concurrent requests. Spring Boot 3.2 and later enable it with one property.
The lesson is broader than Loom. A library-level programming model often works around a limit of the platform. Platforms evolve, and when the limit is removed, the workaround becomes pure cost. Before adopting a model that spreads through all code, it is worth asking whether the limit it addresses is likely to be fixed below us, and how expensive it would be to leave if it is.
4Adopt Where the Benefit Is Large, Keep Reversal Cheap
The practice I would take from this is twofold. First, adopt a programming-model shift per workload, where the measured benefit is large, rather than as a company-wide default. A gateway that holds 100,000 connections should be reactive; an internal CRUD service should not, until it shows a need.
Second, design so that a later reversal is cheap. Keep the new model at the edges: controllers, clients and adapters may use Mono and Flux, but the domain logic in the middle works on plain values. The organisations that moved back most easily were the ones whose reactive code stayed in the web and integration layers. Those that had Mono in every service method found that leaving meant rewriting everything.
Notice that in the first version, moving to MVC on virtual threads means rewriting one adapter method, while the Billing class and its tests stay as they are.
5Track the Industry, Decide From Your Own Load
Industry trends are useful signals, but they come from the companies with the most extreme workloads, and their constraints are not ours. The question to ask is what our own services look like: concurrency at peak, where request time goes, how many connections are open, how much fan-out there is. With those numbers, most decisions become obvious. Without them, we follow whichever talk was most convincing. A small set of reference benchmarks, maintained by the platform team and rerun on each Java LTS, keeps that evidence current and makes the next shift a measured decision rather than a wave.
- New model gains attentiontalks, benchmarks, vendor claims
- Measure our own load profilesconcurrency, I/O wait, connections, fan-out
- Large benefit for a specific workload?YesPilot it on that workloadNoStay on the default
- Can it stay at the edges?YesAdopt with boundariesNoAdopt only with an exit plan
- Review when the platform changesis the reason still there?
5 steps in order. Play them, or step through them one at a time.
6Follow-up questions
Was adopting reactive a mistake?
Not as a whole. For gateways, streaming and connection-heavy services it was the right tool and remains so. The mistake, where there was one, was making it the default for every service and letting it spread into domain code, so the cost was paid everywhere while the benefit appeared in a few places.
How do you avoid swinging too far back now?
By applying the same rule in the other direction: keep reactive where measurements show a clear benefit, such as gateways and streaming endpoints, and move services back only when there is a reason, for example significant planned change, staffing difficulty, or no measured gain. Mass rewrites driven by the new trend repeat the original error.
What signals that a new programming model is worth adopting?
A specific, measured limit in our own systems that the default cannot meet, a model that can be confined to the edges, a team that can support it in production, and a plausible exit if the platform later solves the problem. Popularity alone is not one of the signals.
7Conclusion
In this answer, we drew lessons from the reactive wave and the move back to blocking code on virtual threads. A programming model is paid for on every line of code by every developer for years, so its benefit must be large and workload-specific. Reactive delivered for streaming, gateways and high fan-out but was generalised to all services, and Loom then removed the main reason many teams had adopted it. We would adopt future shifts per workload on measured benefit, keep the new model at the edges so reversal stays cheap, and decide from our own load profiles while watching the industry.
Open with
The biggest lesson for me is that a programming model is a different kind of decision from a library choice. A library affects the code that calls it; a model like reactive changes every signature, every test, how transactions and logging context work, and how every incident is debugged.
Then, if they want more
So its cost is paid on every line by every developer for years, and the benefit has to be large enough to justify that. Reactive did deliver real benefits for specific workloads: gateways, streaming, SSE and WebSocket at scale, and high fan-out aggregation.
The problem was that those results were generalised to every service, including CRUD services bound by a 20-connection database pool, where the gain was small and the tax was the same. Then Loom made blocking cheap with virtual threads, which removed the main reason many teams had chosen reactive.
The general point is that library-level models often work around a platform limit, and platforms fix their limits. So for the next shift I'd do three things. Adopt it per workload, where our own measurements show a large benefit, not as a company default.
Keep the new model at the edges, in controllers and adapters, with plain domain code in the middle, because the teams that moved back cheaply were the ones whose reactive code stayed at the edges.
And decide from our own load profiles, concurrency, I/O wait, connections, rather than from conference talks, while still tracking the industry and reviewing the choice whenever the platform changes.
About this answer
- Last updated
- 12 November 2026
- Versions it names
- Java 21, Spring Boot 3.2
- 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.
- Official documentation
- Spring Framework reference, Spring WebFlux, Project Reactor reference guide
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 "Looking back, many organisations adopted reactive stacks around 2017-2020 and some later...": https://scrivio-interview-library.netlify.app/spring-boot/webflux/74dddefc6c/