Scrivio Interview library
DesignIntermediate8 min read · updated 12 November 2026

List the signals that suggest a service should not be reactive, and the signals that suggest it should.

A service should usually not be reactive when its dependencies are mostly blocking (JDBC, JPA, blocking SDKs), its concurrency is modest, it is simple CRUD, or the team is new to Reactor. It is a good candidate when it streams responses, holds many long-lived connections, fans out heavily to non-blocking services, or needs backpressure. Virtual threads have removed the plain concurrency argument in many cases, debugging and observability cost must be counted, and a codebase that is only partly reactive often pays the costs of both models.

Why this question is asked

Choosing between Spring MVC and WebFlux is a decision a team lives with for years, and it is hard to undo. Interviewers ask for the signals rather than a yes or no because they want to see a repeatable way of deciding, one we could hand to another team. In this answer, we will recap what each model is good at, go through the signals against reactive, then the signals for it, look at how virtual threads changed the picture, count the hidden costs of debugging, observability and mixed code, and pull it together into a decision we can apply.

1A Quick Recap of the Two Models

In a blocking service, a request holds a thread from start to finish, and the thread waits whenever the code waits for I/O. In a reactive service, built with Spring WebFlux and Project Reactor, code never waits: each I/O call returns a Mono or Flux, a description of a future value or stream, and a few event-loop threads run the next step when data arrives. That makes reactive services excellent at holding very many concurrent operations and at controlling how fast data flows, through backpressure, a signal from the consumer saying how much it can accept.

The price is a different programming model. Logic becomes a chain of operators, nothing runs until something subscribes, stack traces show framework frames rather than our methods, and any blocking call inside the chain stalls an event-loop thread that many requests share. So the question is always whether a service needs what reactive is good at badly enough to pay that price.

2Signals That a Service Should Not Be Reactive

The strongest signal is blocking dependencies. If the service talks to its database through JDBC or JPA, or uses SDKs that only offer blocking clients, every one of those calls must be wrapped and moved to a bounded elastic thread pool. At that point the service is running on threads anyway, with more code and more ways to make mistakes, and it gets little of the benefit.

The second is modest concurrency. A service that handles a few hundred concurrent requests fits comfortably in Spring MVC's default thread pool of 200 threads, or in virtual threads with no pool at all. Reactive shines at tens of thousands of concurrent connections, not at a few hundred.

The third is the team. If nobody on the team has run Reactor in production, the first year will bring the classic bugs: a blocking call on the event loop, a Mono that is built but never subscribed, a lost security or logging context. The fourth is simple CRUD: a service that reads a request, writes a row and returns gains nothing from operators designed for streams.

3Signals That a Service Should Be Reactive

Streaming responses are the clearest case. If the service sends server-sent events, pushes updates over WebSocket, or streams large results to clients as they are produced, Flux and backpressure model that naturally, and the client's pace controls how fast we read from upstream.

Many long-lived connections are the second. A notification hub holding 100,000 open connections, most of them idle at any moment, is the textbook reactive workload. High fan-out to non-blocking services is the third: a gateway that calls ten other HTTP services per request, all through a non-blocking client like WebClient, uses Reactor's zip, merge, timeout and retry operators well. And any pipeline that must not be overwhelmed by a fast producer, such as consuming a firehose of events, benefits from end-to-end backpressure.

Signals for and against a reactive service
SignalPoints towardsWhy
JDBC, JPA or blocking SDKsnot reactiveevery call must be offloaded to a thread pool
A few hundred concurrent requestsnot reactivea thread pool or virtual threads cope easily
Simple CRUDnot reactiveoperators add code, not value
Team new to Reactornot reactiveclassic bugs while learning, slow incidents
Streaming responses (SSE, WebSocket)reactiveFlux and backpressure model the stream
Many long-lived connectionsreactivefew threads hold many idle connections
Heavy fan-out to non-blocking APIsreactive (or virtual threads)zip, timeout and retry operators
Fast producer, slower consumerreactiveend-to-end backpressure
Most real services show a few signals each way; the blocking dependencies usually decide it.

4How Virtual Threads Changed the Picture

For years, one of the main reasons to choose reactive was that blocking services ran out of threads. Each platform thread reserves a large stack, so a service with 10,000 concurrent slow calls needed 10,000 expensive threads. Virtual threads, final in Java 21 and enabled in Spring Boot 3.2 and later with spring.threads.virtual.enabled=true, remove that limit: a blocked virtual thread costs a few kilobytes of heap, and the JVM can run hundreds of thousands of them.

So a service whose only reason for going reactive was concurrency can now stay blocking and still scale. The signals that remain for reactive are the ones about streaming, backpressure and its operator toolkit, not raw thread counts. One caveat: virtual threads move the bottleneck, they do not remove it. If 10,000 virtual threads all want a database connection from a pool of 20, they queue on the pool, so pools and downstream limits still need sizing.

5The Hidden Costs: Debugging, Observability and Mixed Code

Two costs rarely appear in the design discussion but show up every week in operations. Debugging is harder: an exception in a reactive chain shows operator frames, and we need checkpoint() or the Reactor debug agent to see which line assembled the failing chain. Observability needs extra work because a request hops between threads, so ThreadLocal-based tools like MDC logging and tracing need Reactor's Context and Micrometer's context propagation to keep the trace id attached.

The worst outcome is a codebase that is reactive in some places and blocking in others. A controller returns Mono, but the service below calls JPA, and somewhere a block() call turns the stream back into a blocking call. That code pays the learning and debugging cost of reactive and the thread cost of blocking, and it hides blocking calls on event-loop threads, which only show up under load. If we choose reactive, we should choose it for the whole request path.

Java
// The mixed pattern to avoid
@GetMapping("/orders/{id}")
Mono<OrderDto> get(@PathVariable long id) {
Order o = orderRepository.findById(id).orElseThrow(); // blocking JPA on the event loop
return pricingClient.price(o) // non-blocking WebClient call
.map(p -> OrderDto.of(o, p));
}
// Works in tests; under load every request on this event-loop thread waits for the database

Notice that nothing fails in a quick test. BlockHound, a Java agent that throws when a blocking call runs on a non-blocking thread, is the practical way to catch this in CI if a team does choose reactive.

6Putting the Signals Together

In practice we weigh the signals in a fixed order. First, the dependencies: if most of the I/O is blocking and will stay that way, the answer is Spring MVC, now with virtual threads when concurrency is high. Second, the workload shape: streaming, long-lived connections and backpressure point to reactive. Third, the team and its tooling: a team fluent in Reactor with BlockHound, context propagation and good dashboards lowers the cost; a team new to it raises it. Finally, we write the decision down in a short design note so the next team can see why the service was built the way it was.

7Follow-up questions

Is WebClient a reason to make the whole service reactive?

No. WebClient can be used from a blocking service, and Spring's RestClient, added in Spring Framework 6.1, gives a modern synchronous API that works well with virtual threads. Using a non-blocking client in one place does not require reactive controllers, and choosing reactive should depend on the whole request path.

What does BlockHound do?

BlockHound is a Java agent that instruments known blocking JDK methods and throws an error when one is called from a thread marked as non-blocking, such as a Reactor event-loop thread. Teams install it in tests so that a hidden blocking call, for example a JDBC query or a Thread.sleep inside a chain, fails the build instead of degrading production under load.

Can R2DBC fix the blocking database problem?

R2DBC is a reactive database API, and with it the database calls become non-blocking, so a fully reactive service becomes possible. The trade-off is that we lose JPA's entity mapping, lazy loading and much of the tooling around it, and some drivers and features lag behind JDBC. It is a good fit when a reactive design is justified for other reasons, not as a reason by itself.

8Conclusion

In this answer, we saw that blocking dependencies, modest concurrency, simple CRUD and a team new to Reactor point away from reactive, while streaming, many long-lived connections, heavy non-blocking fan-out and backpressure point towards it. Virtual threads have removed the raw concurrency argument in many cases, debugging and observability carry a real cost, and half-reactive codebases tend to pay for both models. Weighing dependencies first, then workload shape, then team skill gives a decision we can explain and repeat.

What to say in the interviewAbout 100 seconds aloud

Open with

I would split the signals into two groups. Against reactive: the service's dependencies are mostly blocking, such as JDBC, JPA or SDKs with only blocking clients, because then every call has to be wrapped and offloaded to a thread pool and we get little benefit.

Then, if they want more

Modest concurrency, a few hundred requests at a time, is another, since a thread pool or virtual threads handle that easily. Simple CRUD and a team that has never run Reactor in production are the other two.

For reactive: streaming responses like server-sent events or WebSockets, many long-lived connections that are mostly idle, heavy fan-out to non-blocking services where zip, timeout and retry operators help, and any flow where a fast producer must not overwhelm a slow consumer, which is what backpressure is for. Then I would add two points about the current landscape.

Virtual threads, since Java 21, take away the plain concurrency argument for many services, because blocking is cheap again, so reactive needs to earn its place through streaming and backpressure. And the operating cost is real: stack traces full of operator frames, context propagation for MDC and tracing, and tools like BlockHound to catch blocking calls.

Finally, I would warn against half-reactive code, a Mono controller over blocking JPA, because it pays the costs of both models and hides blocking calls on the event loop. So I check the dependencies first, then the workload, then the team, and write the decision down.

About this answer

Last updated
12 November 2026
Versions it names
Java 21, Spring Boot 3.2, Spring Framework 6
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 "List the signals that suggest a service should not be reactive, and the signals that...": https://scrivio-interview-library.netlify.app/spring-boot/reactive-testing-and-ops/cd17b37190/