Spring WebFlux Fundamentals
Fast recall
Quick revision
Core answer
Whether you understand WebFlux as a non-blocking, event-loop alternative to MVC using Reactor (Mono/Flux), and can name when it helps and when it hurts.
Choosing WebFlux because 'reactive is faster' without naming the workload (high concurrency, low-thread, backpressure) that justifies it, or the costs (debugging, blocking pitfalls).
Frame WebFlux as a non-blocking event-loop stack using Reactor (Mono/Flux) that helps high-concurrency/low-thread workloads — and name the costs (harder debugging, the one-blocking-call-defeats-the-point rule) and when MVC is the better choice.
Interview-ready guide
Interview answer
Spring WebFlux is the reactive-stack web framework in the Spring ecosystem — a non-blocking, event-loop alternative to Spring MVC, built on Project Reactor's Mono and Flux and running on a few event-loop threads.
It exists because the thread-per-request model of Spring MVC sets a ceiling on concurrency: each blocked request holds a thread, threads are expensive, and at high concurrency — tens of thousands of connections, streaming, backpressure-heavy workloads — blocking I/O becomes the bottleneck. WebFlux's event-loop model handles far more concurrent requests on far fewer threads by never blocking them.
The mental model I stress is that controllers return Mono for zero-or-one results and Flux for zero-to-many, and backpressure lets a slow consumer control a fast producer. sleep, a JDBC call — the few event-loop threads stall and every client waits, so blocking work has to go on a separate scheduler or be replaced with a reactive client.
The honest trade-off is scalability versus complexity: WebFlux is much harder to write and debug because it's async and declarative with no linear stack trace, so I choose it only for the workloads that justify it — high concurrency, streaming, backpressure — and keep Spring MVC for typical CRUD with blocking JDBC.
Spring WebFlux Fundamentals
Direct Answer
Spring WebFlux is the reactive-stack web framework in the Spring ecosystem — a non-blocking, event-loop-based alternative to Spring MVC that uses Project Reactor (Mono/Flux) to handle many requests on a few threads. It exists because the thread-per-request model of Spring MVC (servlet, blocking I/O) sets a ceiling on concurrency: each blocked request holds a thread, and threads are expensive (memory, context switching), so at high concurrency (tens of thousands of connections, streaming, backpressure-heavy workloads) blocking I/O becomes a bottleneck. WebFlux's event-loop model handles far more concurrent requests on far fewer threads by not blocking.
Common Mistakes & Pitfalls
Choosing WebFlux because 'reactive is faster' without naming the workload (high concurrency, low-thread, backpressure) that justifies it, or the costs (debugging, blocking pitfalls).
Check your understanding
Answer these without looking back at the article.
- What workload justifies Spring WebFlux over Spring MVC, and when is MVC the better choice?
- What is the 'golden rule' of WebFlux, and why does one blocking call defeat the model?
- What are Mono and Flux, and how does backpressure work between them?
- Why is reactive code harder to debug than blocking code, and what changes in a stack trace?
- How do you handle a necessary blocking call in a WebFlux application without stalling the event loop?
Related interview prep categories
1Looking for a structured roadmap?
Every module on this page is also part of the full Java backend interview track.