Scrivio Interview library
LeadershipAdvanced6 min read · updated 12 November 2026

You own 30 WebFlux services written over five years. Some engineers want to move them back to Spring MVC on virtual threads. How would you decide which, if any, to migrate?

I would not migrate the 30 services as a programme; I would migrate the ones where it pays for itself. A migration costs engineering time and risk, so it needs a concrete benefit such as easier maintenance, easier hiring or fewer incidents. Good candidates are plain request-response services with simple pipelines and a history of bugs caused by reactive complexity; services that use streaming, backpressure or WebSockets stay reactive. I would start with a pilot on one service, compare latency, resource use and developer time, and in every case avoid mixing the two styles inside one service without clear boundaries.

Why this question is asked

After a technology wave turns, teams often want to rewrite everything in the new style, and leaders have to decide whether that is progress or churn. Here the engineers have a point: virtual threads removed the main reason many services went reactive. But 30 services built over five years are also 30 working systems. Interviewers ask this to see whether we decide with evidence rather than taste. In this answer, we will recap why the question exists now, set out the costs and benefits of migrating, sort services into candidates and keepers, design the pilot, and cover how to keep the services that remain mixed under control.

1A Quick Recap: Why This Question Exists Now

Many teams chose WebFlux five years ago because platform threads were expensive: a service that waited on I/O for most of each request could only handle a few hundred concurrent requests with a thread per request. Reactive programming avoided that by never blocking, at the cost of a different programming model, non-blocking drivers everywhere and harder debugging.

Since Java 21 and Spring Boot 3.2, Spring MVC on virtual threads handles high concurrency with ordinary blocking code. So for many services the original reason to be reactive has gone, while the costs remain. That does not make every reactive service a mistake; it means each one deserves a fresh look.

2Counting the Cost of a Migration

A migration rewrites every controller, every repository (R2DBC to JDBC or JPA), every HTTP client (WebClient to RestClient), and every test that uses StepVerifier or WebTestClient in reactive mode. For a medium service, say 15,000 lines, a realistic estimate might be four to eight engineer-weeks, plus a period of higher incident risk while the new version beds in. Across 30 services that is years of engineering time that is not spent on product work.

So the question for each service is what we get back. Valid answers are measurable: features taking less time to build because the code is easier to change, fewer incidents caused by blocking calls on event loops or lost context, less time in on-call investigations because stack traces make sense, and easier hiring and onboarding because most Java developers know the blocking style. 'The new style is nicer' is not enough on its own.

3Sorting Services Into Candidates and Keepers

Most services fall clearly on one side once we look at what they do and what their history says. I would ask each owning team for a one-page review with a few facts: the workload type, the incident history of the last year, how often the service changes, and whether its pipelines are simple.

Step throughDeciding whether to migrate one WebFlux service
  1. Streaming, backpressure or WebSockets?
    YesKeep reactiveNoContinue
  2. Changes often or has reactive-caused incidents?
    YesCandidateNoLeave as it is for now
  3. Pipelines simple request-response?
    YesMigrate after the pilot proves outNoEstimate cost first; maybe partial
  4. Track the resultlead time, incidents, latency, cost

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

Notice that the service that rarely changes and rarely fails is left alone even if it is a perfect technical candidate. Its code may be hard to read, but nobody needs to read it often, and a rewrite only adds risk. The best candidates combine a simple request-response workload with frequent changes and a record of reactive-specific bugs.

4Running a Pilot on One Service

Before committing to more than one, we migrate one candidate and measure. Before starting, we record a baseline: p50 and p99 latency under a standard load test, CPU and memory per instance, and the time recent changes took from start to production. Then a small team migrates the service, keeping the API identical so clients do not notice, and runs the new version behind a canary for a few weeks.

The comparison should include developer time, not only runtime numbers. If latency and resource use are similar, which is the usual outcome for request-response services, but changes ship noticeably faster and the on-call team stops losing hours to opaque stack traces, the migration is worth it for similar services. If the pilot shows a resource increase, for example because the service held many idle WebSocket connections, we learn that before repeating it.

What to compare in the pilot
MeasureWhy it matters
p50 and p99 latency under loadNo user-facing regression
CPU and memory per instanceRunning cost of the new model
Lead time for recent change typesThe maintenance benefit we are paying for
Incidents and time to diagnoseThe operational benefit
Engineer-weeks spent on the migrationThe cost side, to estimate the rest

5Keeping Mixed Services Under Control

For a long time the organisation will run both styles, and sometimes one service will contain both, for example an MVC service that still uses a Reactor-based client library. That is acceptable at a clear boundary: the MVC code calls the reactive client and blocks on its result with block(), which is cheap on a virtual thread, and nothing reactive leaks further into the code. What we must not do is let both styles spread through the same layers, with some repositories returning Mono and others returning entities, because then every developer has to understand both models and every boundary is a place for bugs such as blocking on an event loop thread.

So the rule I would set is one style per service, with adapters only at the edges, and a clear default for new services, MVC on virtual threads unless the workload needs streaming or backpressure. That default stops the problem from growing while the migration decisions are made one by one.

6Follow-up questions

Would you ever migrate all 30?

Only if the evidence from the first few showed a clear benefit for each type of service, and even then I would migrate them when they need significant work anyway, such as a major feature or a dependency upgrade. Combining the migration with work that touches the code already reduces its cost a lot.

How do you handle the engineers who built the reactive services?

By making the decision about the services, not about their past choices, which were reasonable at the time. They also know where the reactive code hurts and where it helps, so they are the best people to write the reviews and run the pilot.

What if the pilot shows no difference at all?

Then the migration is not worth its cost for similar services, and we stop after the pilot. The new default for new services still applies, so the share of reactive code shrinks naturally as services are replaced, without a dedicated programme.

7Conclusion

In this answer, we saw that migrating from WebFlux to Spring MVC on virtual threads costs real engineering time and risk, so each migration needs a measurable benefit such as easier maintenance, hiring or fewer incidents. Good candidates are request-response services with simple pipelines and bugs caused by reactive complexity; services with streaming, backpressure or WebSocket workloads stay reactive. A pilot on one service compares latency, resource use and developer time before any wider change, and styles are not mixed inside one service without clear boundaries.

What to say in the interviewAbout 80 seconds aloud

Open with

I would decide service by service, with evidence, rather than run a migration programme. Virtual threads did remove the main reason many of these services went reactive, but a migration rewrites controllers, repositories, clients and tests, maybe four to eight engineer-weeks each, plus risk.

Then, if they want more

So it needs a benefit I can measure: faster changes, fewer incidents, easier on-call diagnosis or easier hiring. I would ask each team for a short review of the workload, the last year of incidents and how often the service changes. Services with streaming, backpressure or WebSocket workloads stay reactive, because that is where Reactor is genuinely strong.

Services that rarely change and rarely break stay as they are, because nobody gains from rewriting them. The candidates are request-response services with simple pipelines that change often or have had bugs from reactive complexity, like blocking on the event loop or lost context.

Then I would run one pilot: baseline latency, resource use and lead time, migrate with the same API, canary it, and compare, including developer time. If it pays off, we migrate similar services, ideally when they need major work anyway.

And whatever we decide, one style per service, with adapters only at the edges, and MVC on virtual threads as the default for new services.

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
JEP 444, Virtual Threads
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 "You own 30 WebFlux services written over five years. Some engineers want to move them...": https://scrivio-interview-library.netlify.app/java/virtual-threads/1150db3bc6/