Scrivio Interview library
ScenarioFoundations7 min read · updated 12 November 2026

A junior developer wants to make a new internal admin service reactive because it is the modern approach. The service has 5 users and uses JPA. What would you tell them?

I would tell them that reactive programming pays off when a service has very high concurrency and non-blocking I/O all the way down, and this service has neither: five users and JPA, which blocks. Making it reactive would add complexity, harder testing and harder debugging with no benefit, so Spring MVC is the right choice here. Learning Reactor is still worthwhile, but production choices should follow the requirements, and I would suggest a better place for them to practise it.

Why this question is asked

Every team meets this conversation sooner or later: a motivated developer wants to use the newest tool, and the tool is real and good, but not for this job. Interviewers ask it to see whether we can explain a technical trade-off clearly and kindly, and whether we know what reactive programming is actually for. In this answer, we will recap what reactive buys and costs, look at why JPA undoes the benefit, compare the two stacks for this service, and then talk about how to have the conversation so the junior developer comes away encouraged.

1A Quick Recap of What Reactive Buys

In a traditional Spring MVC service, each request runs on a thread, and when the code waits for the database, the thread waits too. That is blocking I/O. With a pool of 200 threads, we can serve about 200 requests at the same time, which is far more than enough for most services.

Reactive programming, with Spring WebFlux and Project Reactor, never lets a thread wait. A call that needs I/O returns immediately with a Mono or Flux, a promise of a value or a stream of values, and the thread moves on to other work. When the result arrives, the next step runs. That lets a small number of threads, typically one per CPU core, serve tens of thousands of concurrent requests. So the benefit is concurrency at large scale with little memory, plus tools for streaming and backpressure.

Our admin service has five users. Even if all five click at once, that is five requests. A blocking service with its default thread pool handles that without noticing. The problem reactive solves simply does not exist here.

2Why JPA Undoes the Benefit

There is a second, stronger reason. JPA and Hibernate run on JDBC, and JDBC is a blocking API: every query holds the calling thread until the database answers. In WebFlux, blocking a thread is the one thing we must never do on the event loop, because the event loop has so few threads that one blocked call delays everyone. So a reactive service with JPA has to push every repository call onto a separate pool.

Java
// What the reactive version would have to look like with JPA
@GetMapping("/users/{id}")
Mono<UserDto> get(@PathVariable long id) {
return Mono.fromCallable(() -> userRepository.findById(id)) // blocking JPA call
.subscribeOn(Schedulers.boundedElastic()) // moved to a thread pool
.map(opt -> opt.map(UserDto::from).orElseThrow());
}
// The plain Spring MVC version
@GetMapping("/users/{id}")
UserDto get(@PathVariable long id) {
return userRepository.findById(id).map(UserDto::from).orElseThrow();
}

Notice what the reactive version really does: it takes a blocking call and runs it on a pool of ordinary threads. That is exactly what Spring MVC already does, just with more code and more ways to get it wrong. Lazy loading makes it worse, because a lazy association touched later in the chain runs outside the transaction and fails, or blocks the event loop. We could switch to R2DBC, the reactive database API, but then we lose JPA's entity mapping, lazy loading and the rest of the tooling the team knows, for a service with five users.

3Comparing the Two for This Service

When we put the two side by side for this specific service, the comparison is not close.

Reactive vs Spring MVC for a 5-user JPA admin service
ConcernWebFluxSpring MVC
Concurrency needed5 requests5 requests
Handles that loadyesyes, easily
Fits JPAno; wrap every call on boundedElasticyes, directly
Code to writemore: Mono, Flux, schedulersless: plain methods
TestingStepVerifier, WebTestClientMockMvc, plain JUnit
Debuggingoperator stack traces, checkpoint()normal stack traces
Future maintainersneed Reactor skillsany Spring developer
For this service, reactive adds cost on every row and benefit on none.

Writing, testing and debugging are where the difference shows every day. A Spring MVC test with MockMvc reads like the request it sends. A reactive test needs StepVerifier or WebTestClient and an understanding of when a chain actually subscribes. A failing reactive chain prints a stack trace full of operator frames instead of our method names. And the next person who maintains this admin tool, perhaps in two years, probably knows Spring MVC and may not know Reactor.

4How We Would Have the Conversation

The goal is that the developer makes the right choice and still feels their curiosity is welcome. So we start by agreeing with what is true: Reactor is a valuable skill and modern Spring supports it fully. Then we ask questions instead of handing down an answer. How many concurrent requests do we expect? What does our persistence layer do when it waits for the database? What would we gain if the service handled 50,000 concurrent requests instead of 200? Usually the developer reaches the conclusion themselves, which teaches far more than being told.

We also explain the general rule behind it: production choices follow requirements. A technology is modern because it solves a new problem well, not because it is new, and every choice we make is code someone else must maintain. The simplest tool that meets the requirements is the professional choice.

Finally, we give the curiosity somewhere to go. If the team has a streaming feature, a gateway, or a service that fans out to many non-blocking APIs, that is a good real place to learn Reactor with a reviewer who knows it. Otherwise a side project, a team learning session, or a spike that compares the two approaches on a realistic load are all good options. It is also worth mentioning that virtual threads, available since Java 21, now cover many of the high-concurrency cases that used to push teams to reactive.

5Follow-up questions

Would your answer change if the service had 50,000 concurrent users?

It might, but the persistence layer would still matter. With JPA we would first try Spring MVC with virtual threads, which handle very high concurrency with blocking code, and size the connection pool for the database. Reactive would become attractive if we also needed streaming, long-lived connections or backpressure, and if we were willing to move to a non-blocking database driver such as R2DBC.

Is it ever fine to use WebFlux with JPA?

It works if every JPA call is wrapped and run on a bounded elastic scheduler, and some teams do it when most of a service talks to non-blocking APIs and only a little touches a database. But the blocking part gets none of the reactive benefit, and mistakes such as a forgotten wrapper or lazy loading outside the transaction cause hard bugs. For a service whose main job is JPA work, it is the wrong fit.

How do you avoid discouraging the junior developer?

By treating the suggestion as a good question rather than a mistake, working through the requirements together so they reach the answer, and offering a real opportunity to use Reactor where it fits. Recognising their initiative in front of the team helps too. The lesson we want them to keep is how to choose, not that their ideas get rejected.

6Conclusion

In this answer, we saw that reactive programming exists to serve very high concurrency with non-blocking I/O, that a five-user admin service needs neither, and that JPA's blocking calls would force us to wrap everything on a separate thread pool, which is what Spring MVC already does more simply. We compared the two stacks for this service and found reactive adds cost everywhere, and we talked through how to guide the developer to that conclusion while keeping their interest in Reactor alive.

What to say in the interviewAbout 100 seconds aloud

Open with

I would start by agreeing that Reactor is worth learning, because it is, and then walk through the requirements with them. Reactive programming helps when a service has to handle a very large number of concurrent requests with non-blocking I/O all the way down, and it uses a handful of event-loop threads to do it.

Then, if they want more

This service has five users, so at most five requests at a time, which a normal Spring MVC thread pool handles without noticing. The second problem is JPA. JPA runs on JDBC, and JDBC blocks, so in WebFlux every repository call would have to be wrapped in Mono.fromCallable and pushed onto the bounded elastic scheduler.

That is just a more complicated way of doing what Spring MVC already does, and lazy loading would add more traps. So we would pay with extra code, harder tests using StepVerifier, stack traces full of operator frames, and a future maintainer who needs Reactor skills, and get nothing back.

I would explain the general principle that production choices follow requirements and that the simplest stack that meets them is the professional choice. Then I would give their curiosity a real outlet: a streaming or high fan-out service where Reactor fits, a spike, or a learning session for the team.

I would also mention that virtual threads now cover many high-concurrency cases with plain blocking code, which is worth knowing when they make this kind of choice in the future.

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 "A junior developer wants to make a new internal admin service reactive because it is the...": https://scrivio-interview-library.netlify.app/spring-boot/reactive-testing-and-ops/816ab8401e/