Scrivio Interview library
LeadershipPrincipal7 min read · updated 12 November 2026

Your organisation has 150 WebFlux services built over six years. With virtual threads now mature, would you plan a migration back to blocking code? How would you decide?

No, I would not plan a wholesale migration. Working WebFlux services carry a sunk cost and every rewrite carries risk, so I would first measure what reactive code costs us today in defects, onboarding, debugging time and hiring. Then I would make blocking code with virtual threads the default for new services, migrate opportunistically where a service is simple CRUD or is being rewritten anyway, keep reactive where streaming or backpressure matters, and explain the reasoning so teams see an evidence-based change of default rather than a reversal.

Why this question is asked

Large organisations make technology bets that outlive the reasons for them. Six years ago, WebFlux was the main way to get high concurrency on the JVM without huge thread pools. Virtual threads changed that, and now leaders face pressure from both sides: some engineers want to rewrite everything, others are proud of what they built and see the question as an attack. Interviewers ask this at senior levels because it tests judgment about sunk cost, risk, evidence and communication more than knowledge of either technology. In this answer, we will look at why the question arises, how to measure the real cost of staying, how to sort the 150 services, how to set the default and run an opportunistic migration, and how to communicate the decision.

1Why the Question Comes Up Now

WebFlux solved a real problem: a blocking service needed one platform thread per concurrent request, and platform threads are expensive, so high-concurrency services ran out of threads long before they ran out of CPU. Reactive code avoided that by never blocking. Virtual threads, final in Java 21, attack the same problem differently: blocking is fine again because a waiting virtual thread costs a few kilobytes of heap instead of a megabyte of stack.

So the main reason many services chose reactive has weakened. What remains is the reactive model's real advantages, such as end-to-end backpressure and streaming operators, and its real costs, such as a steep learning curve, harder stack traces and context propagation. The question is not whether virtual threads are better in general. It is whether, for each of our services, the remaining advantages are worth the remaining costs, and whether changing is worth the cost of change.

2Why a Big-Bang Migration Is the Wrong Starting Point

The money and time spent building the 150 services are gone whatever we decide; that is what sunk cost means, and it should not keep us on a path by itself. But the services also work. They have years of bug fixes, tuning and operational knowledge baked in. A rewrite throws that away and reintroduces bugs that were fixed long ago.

Let us put rough numbers on it. If a typical service takes four to eight engineer-weeks to convert and test carefully, 150 services cost 600 to 1,200 engineer-weeks, which is roughly 12 to 25 engineer-years, during which those engineers ship no product features. And every conversion is a production change with a chance of incidents. Unless the ongoing cost of reactive code is larger than that, a full migration loses money. So before deciding anything, we need to know that ongoing cost.

3Measuring What Reactive Costs Us Today

We gather evidence from our own organisation rather than from conference talks. Four measures matter most. Defect rate: how many production incidents and bugs trace back to reactive-specific mistakes, such as blocking calls on event-loop threads, lost context, subscriptions that never happen or leaks. Onboarding time: how long new engineers take to make a confident change in a reactive service compared with a Spring MVC one. Debugging time: how long incidents in reactive services take to diagnose. Hiring: how many candidates we lose or how much longer roles stay open when Reactor experience is required.

We compare reactive and blocking services of similar size and traffic, because a busy gateway will always have more incidents than an internal tool. If the numbers show reactive services cost us, for example, 30 percent more incident time and a month longer onboarding, that justifies changing direction. If the difference is small, the honest answer is to leave them alone and only change the default for new work.

4Sorting the 150 Services

With evidence in hand, we sort services into groups instead of treating them as one block. The sorting is a short conversation with each owning team, not a central decree.

Step throughDeciding what to do with one service
  1. Being rewritten anyway?planned major change in the next year
    YesRebuild on the new defaultNoNext question
  2. Streaming or backpressure needed?SSE, WebSocket, event fan-out, gateways
    YesKeep reactiveNoNext question
  3. Simple CRUD with high reactive cost?measured incidents, onboarding, debugging
    YesMigrate when the team has capacityNoNext question
  4. Leave it reactiverevisit when it changes for other reasons

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

Most services end up in the last box, and that is a good outcome.

Simple CRUD services that use reactive code only because it was the standard at the time are the best candidates, especially if they wrap blocking work with R2DBC or bounded elastic schedulers. Services already scheduled for a major rewrite should be rebuilt on the new default, since the migration cost is then almost free. Services that stream data, hold many long-lived connections, or depend on backpressure, such as gateways, event fan-out and live feeds, should stay reactive because that is where the model earns its cost. Everything else stays as it is until it is touched for another reason.

5Setting the Default and Migrating Opportunistically

The most powerful lever is the default for new services. We publish that new services use Spring MVC with virtual threads (spring.threads.virtual.enabled=true in Boot 3.2 and later) unless a short design note shows a need for streaming or backpressure. That stops the reactive estate from growing without forcing anyone to rewrite working code.

Migration then happens opportunistically: when a team already has to change a service substantially, they may move it to the new default as part of that work. We support them with a migration guide, shared test patterns and a reviewer who has done it before. We also set limits: no partial conversions that leave half a service blocking and half reactive, because that mix gets the costs of both. And we keep investing in the reactive services that stay, with upgrades and training, so they do not become neglected second-class citizens.

We track progress and results: how many services moved, incidents before and after, and engineer feedback. If after a year the migrated services show no improvement, we stop and say so.

6Communicating the Reasoning

How we explain this matters as much as the decision. Engineers who championed WebFlux made a sound choice with what Java offered at the time. If the change looks like leadership reversing course on a whim, people lose trust in the next standard we publish, and the best reactive engineers may leave.

So we write down the reasoning: what changed in the platform, what our own measurements show, what we are and are not asking teams to do, and which services should stay reactive and why. We present it in an engineering forum, take questions, and name the conditions under which we would revisit the decision. Framing it as the default evolving with the platform, backed by data, makes it a normal technical decision rather than a verdict on past work.

7Follow-up questions

What if the measurements show reactive services are not more costly?

Then we leave them alone and still consider changing the default for new services, because hiring and onboarding are easier on the plain blocking model for most teams. The measurements protect us from a costly migration driven by opinion. It is a perfectly good outcome for an organisation to run two models for years, as long as each has clear criteria and the teams that own them are supported.

How would you migrate one service safely?

We would migrate behind the same API contract, keep the existing contract tests and add more if coverage is thin, and run the new version alongside the old one, routing a small share of traffic to it first. We compare latency, error rates and resource use before shifting all traffic. We convert the whole service in one effort rather than leaving it half and half, and we keep the old version deployable until the new one has run cleanly for a few weeks.

Would you ever mandate a full migration?

Only if reactive code became a clear liability, for example if the frameworks we rely on stopped maintaining their reactive support, or if security and upgrade work on the reactive stack became much more expensive than on the blocking one. Even then I would phase it over years and fund it explicitly, rather than ask teams to squeeze it into feature work.

8Conclusion

In this answer, we saw why virtual threads reopen the question, why a wholesale rewrite of 150 working services is the wrong starting point, and how to measure the real ongoing cost through defects, onboarding, debugging time and hiring. We sorted services into those to rebuild, those to keep reactive and those to leave alone, changed the default for new work, migrated only when a service is being changed anyway, and explained the reasoning so teams see an evidence-based evolution rather than a reversal.

What to say in the interviewAbout 100 seconds aloud

Open with

I would not plan a migration back to blocking code just because virtual threads are mature now. The 150 services work, the money spent building them is gone either way, and a rewrite costs real engineering time and real production risk.

Then, if they want more

If each service takes even a month to convert safely, that is well over ten engineer-years, so the ongoing cost of staying reactive would have to be large to justify it.

My first step would be to measure that cost in our own data: incidents caused by reactive-specific mistakes, how long new engineers take to become productive, how long reactive incidents take to debug, and how much harder hiring is. Then I would sort the services.

Ones that are being rewritten anyway, and simple CRUD services that are only reactive because it was the standard, are candidates to move. Services that stream data or rely on backpressure, like gateways or live feeds, should stay reactive because that is where it pays off. Everything else stays until it changes for another reason.

The biggest lever is the default for new services: Spring MVC with virtual threads unless a short design note shows a need for reactive. I would also avoid half-converted services, since a mix gets the costs of both.

Finally, I would communicate it carefully, explaining what changed in the platform and what our data shows, so the people who built the reactive estate see a reasoned change of default and not a judgment on their work.

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 "Your organisation has 150 WebFlux services built over six years. With virtual threads...": https://scrivio-interview-library.netlify.app/spring-boot/reactive-testing-and-ops/bfe0f7d2dd/