Quick revision
The short answer
I would treat it as a normal review of a technology bet: measure what R2DBC has really cost us (driver issues, missing mapping features, incident rates, onboarding time), benchmark JDBC on virtual threads against our own workloads, and decide with that evidence. If the data supports it, we stop requiring R2DBC for new services but leave stable services alone, and we keep data access behind repository interfaces so a service can move to JDBC later without touching business code. Throughout, we communicate it as learning, not as blame.
What to remember
In this answer, we treated the R2DBC mandate as a technology bet to be reviewed. We measured its real costs, including driver problems, missing mapping features, incident rates and onboarding time, alongside its benefits, then compared it fairly with JDBC on virtual threads on our own services. The decision we reached changes the requirement for new services while leaving stable ones alone, migrates only where evidence demands it, keeps exit cost low with repository interfaces, and is communicated as a routine review rather than as blame.
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 treat it as a normal review of a technology bet: measure what R2DBC has really cost us (driver issues, missing mapping features, incident rates, onboarding time), benchmark JDBC on virtual threads against our own workloads, and decide with that evidence. If the data supports it, we stop requiring R2DBC for new services but leave stable services alone, and we keep data access behind repository interfaces so a service can move to JDBC later without touching business code. Throughout, we communicate it as learning, not as blame.
Background to this question
Large organisations make technology bets that are reasonable when they are made and less so five years later. The skill a principal engineer needs is not picking the perfect bet, it is noticing when the evidence has changed and changing course without a costly big-bang rewrite or a culture of blame. This question tests exactly that: measurement, a fair comparison, a staged exit and careful communication. In this answer, we will recap why the bet was made, measure its real cost, run a fair comparison, decide what changes and what stays, design the exit path, and talk about how to communicate it.
1A Quick Recap: Why the Bet Made Sense
Five years ago, the choice for a high-concurrency relational service was JDBC on platform threads, each costing memory and limited to a few hundred per instance, or a fully reactive stack with R2DBC. Choosing R2DBC for all new services gave one consistent programming model and avoided blocking calls inside WebFlux. Nobody knew then that virtual threads would arrive in Java 21 and make blocking cheap.
Starting the review by acknowledging this matters. The decision was made with the information available; the question now is what the information says today.
2Measuring the Real Cost
Opinions about reactive code are strong, so the review must rest on numbers. I would gather, per service and per stack, the incidents of the last two years tagged by cause, looking for data access causes such as driver bugs, pool exhaustion, lost subscriptions and transaction mistakes. I would collect the workarounds teams built for missing features, such as hand-written relationship loading where JPA would have mapped it, unsupported types and batching. And I would measure onboarding time, how long a new engineer takes to ship a change to a reactive service compared with an MVC one, plus time to resolve incidents.
Equally important is the benefit side: memory and CPU per request, instance counts, and any streaming features that depend on reactive backpressure. A fair review weighs both, because some services may have gained exactly what was promised.
| Measure | Source | Example finding |
|---|---|---|
| Data access incidents | incident tracker, tagged by cause | R2DBC: 14 per year, JDBC: 5 |
| Time to resolve | incident timelines | R2DBC median 3.1 h, MVC 1.4 h |
| Driver and feature gaps | team survey, workaround code | batching and JSON types missing |
| Onboarding time | first meaningful change | R2DBC 6 weeks, MVC 3 weeks |
| Resources per request | load tests, cloud bill | similar memory with virtual threads |
3A Fair Comparison With Virtual Threads
Generic benchmarks from blogs tell us little. I would take two or three representative services, say a CRUD API, a high-throughput lookup service and a streaming endpoint, and build a JDBC plus virtual threads version of each one's data path. Then run the same load test against both, measuring p50 and p99 latency, throughput at fixed CPU, memory, and connection pool behaviour under overload.
The likely result for request-response services is similar throughput and latency with simpler code, while the streaming endpoint may still favour R2DBC. Whatever the result, it is now our result, on our databases, which makes the decision defensible.
4Deciding What Changes and What Stays
If the evidence supports it, the change is to the requirement, not to every service. New services may use JDBC on virtual threads by default, and R2DBC remains allowed where a service is genuinely reactive end to end. Existing services that are stable, well understood and meeting their goals stay as they are. Rewriting working software purely for consistency costs a lot and delivers little to customers.
Migration is reserved for services where the data shows a real problem: frequent data access incidents, painful workarounds, or a team that cannot staff it. For those, migration is scheduled like any other engineering investment, with a business case.
- Is the service stable and meeting its goals?incidents, latency, team confidenceYesLeave it on R2DBCNoConsider migration
- Does it depend on reactive streaming?YesFix its tooling, keep R2DBCNoPlan a move to JDBC
- Migrate behind repository interfacesbusiness code unchanged
- Compare with load and contract teststhen switch traffic
4 steps in order. Play them, or step through them one at a time.
5Keeping the Exit Cost Low
The cost of leaving a technology depends on how far it has spread through the code. If services call DatabaseClient and R2dbcEntityTemplate from controllers and business logic, every class must change. If data access sits behind repository interfaces owned by the domain, such as OrderStore with methods that return domain objects, then a migration replaces one implementation. In a reactive service those interfaces return Mono and Flux, so a move to JDBC also changes their signatures, but the change is mechanical and contained in a well-defined layer.
So part of the reassessment is to ask every R2DBC team, including those staying, to keep data access behind such interfaces. It costs little and turns any future change, in either direction, from a rewrite into a replacement.
6Communicating It Without Blame
How we say this matters as much as what we decide. If the message sounds like 'R2DBC was a mistake', the people who championed it and the teams who built on it hear criticism, and next time nobody will propose a bold bet. So I would present it as a scheduled review of a technology decision, the kind we should do for every major choice: here is what we expected, here is what we measured, here is what changed in the platform, here is the updated guidance. I would credit what the bet delivered, such as a consistent model and the skills teams built, and make clear that existing R2DBC services are not legacy to be ashamed of. Then publish the evidence and the new decision record so anyone can check the reasoning.
7Follow-up questions
What if the benchmarks show R2DBC is clearly better for our workloads?
Then the evidence says keep it, and the review should focus on reducing its costs: better drivers, shared tooling, training and runbooks. A reassessment is not a decision to leave; it is a decision to look. Publishing a result that confirms the bet is just as valuable.
How long would you give this review?
About a quarter. A few weeks to collect incident and onboarding data, a few weeks for the comparison prototypes and load tests, and time to write and discuss the recommendation with the architecture group and team leads. Longer than that and the review becomes a project of its own.
Who should run the comparison?
Ideally a small group that includes people from R2DBC teams and people from MVC teams, so neither side can dismiss the results as biased. The platform team owns the test harness, and the methods are published before the results, so nobody tunes the test to reach a conclusion.
8Conclusion
In this answer, we treated the R2DBC mandate as a technology bet to be reviewed. We measured its real costs, including driver problems, missing mapping features, incident rates and onboarding time, alongside its benefits, then compared it fairly with JDBC on virtual threads on our own services. The decision we reached changes the requirement for new services while leaving stable ones alone, migrates only where evidence demands it, keeps exit cost low with repository interfaces, and is communicated as a routine review rather than as blame.
Open with
I would run it as a normal review of a technology bet, because that is what it is. First I would acknowledge the decision made sense five years ago, before virtual threads existed.
Then, if they want more
Then I would collect real evidence per stack: data access incidents and their causes, time to resolve, workarounds teams wrote for missing features like relationship mapping, onboarding time for new engineers, and on the benefit side resources per request and any streaming features that rely on backpressure.
Next, a fair comparison: take two or three representative services, build a JDBC plus virtual threads version of their data path, and load test both on our own databases.
If the evidence supports it, I would change the requirement, not the existing fleet: new services default to JDBC with virtual threads, R2DBC stays allowed where a service is reactive end to end, and stable R2DBC services are left alone. Migration only happens where the data shows a real problem, with a business case.
To keep exit cost low, I would ask every team to keep data access behind repository interfaces, so switching is a replacement of one layer, not a rewrite. And I would communicate it as a scheduled review with published evidence, crediting what the bet delivered, so nobody feels blamed and people still propose bold ideas.
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.
- Official documentation
- Spring Framework reference, Spring WebFlux, Project Reactor reference guide
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 "Five years ago your organisation chose R2DBC for all new services to be fully reactive....": https://scrivio-interview-library.netlify.app/spring-boot/webflux/b4855be650/