Quick revision
The short answer
I would mix: keep the stable reactive Vert.x code, especially the edge proxies where event loops still win, and write new typical services in the simpler blocking style on virtual threads. Virtual threads give high concurrency with plain blocking code, which removes much of the reason to choose event-loop programming for ordinary services, but event loops remain better for very high connection counts with small messages, low-level networking and backpressure-heavy streaming. A full rewrite costs too much and risks too much; I would weigh skills and debugging cost, measure on real traffic, and change service by service.
What to remember
In this answer, we decided what to do with a Vert.x estate in the era of virtual threads. Virtual threads give high concurrency with simple blocking code, which removes much of the reason for event-loop programming in typical services, while event loops still win for huge connection counts, low-level networking and backpressure-heavy streaming. Rewrites are costly and risky, reactive skills are scarce, so the plan is to keep stable reactive code, write new services in the simpler model, measure on real traffic and change service by service.
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.
I would mix: keep the stable reactive Vert.x code, especially the edge proxies where event loops still win, and write new typical services in the simpler blocking style on virtual threads. Virtual threads give high concurrency with plain blocking code, which removes much of the reason to choose event-loop programming for ordinary services, but event loops remain better for very high connection counts with small messages, low-level networking and backpressure-heavy streaming. A full rewrite costs too much and risks too much; I would weigh skills and debugging cost, measure on real traffic, and change service by service.
Why this question is asked
Years ago, choosing Vert.x for edge proxies and real-time services was a sound performance decision: platform threads were expensive, and event loops let a few threads serve tens of thousands of connections. Java 21 made virtual threads final, and now the same concurrency is possible with ordinary blocking code. Leadership hears this and asks whether the reactive codebase has become a liability. Interviewers ask the question to see whether a senior engineer can separate a technology trend from a business decision. In this answer, we will recap what virtual threads change, see where event loops still win, look at the real cost of a rewrite, weigh the people side, and lay out a measured, service-by-service plan.
1What Virtual Threads Change
A platform thread maps to an operating system thread, costs around a megabyte of reserved stack and is expensive to switch, so servers could only afford a few hundred or thousand of them. That is why blocking code, one thread per request, did not scale to tens of thousands of concurrent connections, and why event-loop frameworks like Vert.x and Netty existed: a few threads that never block, with callbacks or reactive chains instead of waiting.
A virtual thread is a thread managed by the JVM. When it blocks on I/O, the JVM unmounts it from its carrier thread and runs another virtual thread there. Creating a million of them is practical. So code can be written top to bottom, with blocking calls, readable stack traces and ordinary try-catch, and still handle the same concurrency for typical request-response services. For those services, the main reason to choose event-loop programming has largely gone.
2Where Event Loops Still Win
Virtual threads remove the cost of waiting, but not every cost. An event loop holding 200,000 mostly idle WebSocket connections stores a small state object per connection; virtual threads would add a stack per connection, small but growing with call depth, plus scheduling work. For very high connection counts with small, frequent messages, the event loop is still leaner and more predictable.
Low-level networking is the second case. Edge proxies parse protocols, forward bytes between sockets and manage connection pools, all directly on Netty's event loops, with careful control over buffers and memory; that is exactly what Vert.x and Netty were built for. The third case is streaming with backpressure, where a slow consumer must slow down a fast producer across many stages; reactive streams model that explicitly, while with threads we must build it ourselves with bounded queues. Virtual threads also have caveats, such as pinning, where some synchronized code or native calls hold the carrier thread; recent Java versions have reduced this, notably Java 24 removing pinning for synchronized blocks, but libraries still need checking.
| Workload | Event loop (Vert.x) | Virtual threads | Choice |
|---|---|---|---|
| Edge proxy, protocol handling | lean, precise control | workable, less control | keep Vert.x |
| 200k idle WebSockets | small state per connection | stack per connection | keep Vert.x |
| Streaming with backpressure | built into reactive streams | build with bounded queues | keep Vert.x |
| Typical CRUD or BFF service | harder code, same speed | simple code, high concurrency | virtual threads |
| New internal service | needs reactive skills | any Java developer | virtual threads |
3The Cost and Risk of a Rewrite
The existing code works, is tuned and carries years of fixes for edge cases nobody remembers: odd client behaviour, protocol quirks, timeouts that were adjusted after incidents. A rewrite throws that knowledge away and must rediscover it in production. For edge proxies, which sit in front of everything, a regression means an outage for every service behind them.
Rewriting also delivers nothing users can see while it runs. If the proxies handle their load today, a rewrite spends perhaps several engineer-years to arrive where we already are. The better default is to keep stable reactive code, maintain it well, and write new services in the simpler style. A component earns a rewrite only when it needs major changes anyway, or when measurement shows a clear benefit.
4The People Side: Skills and Debugging
The strongest argument for moving away from reactive code is not performance; it is people. Reactive code is harder to write correctly, harder to review, and much harder to debug: stack traces show the event loop's machinery rather than our call chain, and a single blocking call hidden in a library can stall everything. Fewer developers have deep experience with it, so hiring takes longer, and new team members need months to become productive.
This argues for a gradual shift of the default. New typical services are written in plain blocking Java on virtual threads, for example with Spring Boot or Helidon 4, so most engineers can work on them. A smaller group keeps deep Vert.x expertise for the edge and real-time components. Vert.x itself helps here: Vert.x 4.5 and 5 can run verticles on virtual threads, so teams can write sequential code inside the existing framework where that is easier.
5Measuring Before Deciding, and Moving Service by Service
Claims about performance must be checked on our own traffic. For a candidate service, we build a virtual-thread version of one slice, replay real traffic with the same mix of connections, payload sizes and slow clients, and compare throughput, p99 latency, memory and CPU per request. For edge proxies, the test must include connection storms and slow clients, since that is where differences show.
The plan then proceeds service by service. Each service gets a decision with a reason: keep reactive, convert when next changed, or convert now because it is hard to maintain and measurement shows no loss. Progress is reported to leadership as maintainability and incident numbers, not as lines rewritten.
- Edge, huge connection count or heavy streaming?YesKeep reactive, keep expertsNoConsider the simpler model
- Stable and rarely changed?YesKeep as is, maintainNoLook at the cost of change
- Prototype a slice on virtual threadsreplay real traffic
- Same or better on throughput, p99, memory?YesConvert when next changedNoKeep reactive
4 steps in order. Play them, or step through them one at a time.
Every service gets a recorded decision; no big-bang rewrite.
6Follow-up questions
Can the reactive and blocking services coexist in one system?
Yes, easily, because they talk over HTTP, gRPC or messaging, and the protocol does not reveal the threading model. The only coordination needed is the platform contract: the same health endpoints, telemetry, logging and security, so operations look the same for both.
What if leadership wants a single programming model for simplicity?
Explain the trade-off with numbers: the cost and risk of rewriting the edge against the benefit of uniformity. Usually the compromise is one default model for new services, virtual threads, and a small, documented set of exceptions with named owners, which gives most of the simplicity without the risk.
Do virtual threads make reactive libraries obsolete?
Not entirely. They remove the main reason to use reactive programming in ordinary request-response code. Reactive libraries remain useful for streaming, backpressure, combining many asynchronous sources and low-level networking. The likely future is that fewer application developers write reactive code directly, while frameworks and infrastructure still use event loops internally.
7Conclusion
In this answer, we decided what to do with a Vert.x estate in the era of virtual threads. Virtual threads give high concurrency with simple blocking code, which removes much of the reason for event-loop programming in typical services, while event loops still win for huge connection counts, low-level networking and backpressure-heavy streaming. Rewrites are costly and risky, reactive skills are scarce, so the plan is to keep stable reactive code, write new services in the simpler model, measure on real traffic and change service by service.
Open with
I'd mix, and I'd say why in terms of cost and risk. Virtual threads in Java 21 and later let us write plain blocking code and still handle very high concurrency, because a blocked virtual thread just unmounts from its carrier.
Then, if they want more
For typical request-response services that removes most of the reason we chose event-loop programming. But event loops still win in some places, and our edge proxies are one: very high connection counts with small messages, low-level protocol handling with tight buffer control, and streaming with backpressure.
Rewriting those would cost engineer-years, throw away years of edge-case fixes, and put every service behind them at risk, with no visible user benefit. So I'd keep the stable reactive code and maintain it with a small group of experts.
For new services I'd make plain Java on virtual threads the default, because reactive code is harder to hire for, review and debug. Vert.x itself can run verticles on virtual threads, which helps in between.
Before converting anything, I'd prototype a slice and replay real traffic, comparing throughput, p99, memory and CPU, and then decide service by service: keep, convert when next changed, or convert now. And I'd report progress as maintainability and incident numbers.
About this answer
- Last updated
- 12 November 2026
- Versions it names
- Java 21, Java 24
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. 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 company built its edge proxies and real-time services on Vert.x for performance...": https://scrivio-interview-library.netlify.app/java/other-java-frameworks/76fd7e9bec/