Interview questions
Question 165 of 254
FreeWhat is the fundamental difference between Spring MVC and Spring WebFlux?
Reactive Programming (WebFlux)
Spring MVC is built on the traditional Servlet API's thread-per-request model — each incoming request is handled by a dedicated thread from a pool, which blocks while waiting on I/O (a database call, an HTTP call to another service). Spring WebFlux is built on a reactive, non-blocking foundation (Project Reactor, running on Netty by default) where a small, fixed number of event-loop threads handle many concurrent requests by never blocking — I/O operations register a callback and the thread moves on to other work instead of waiting idle.
Advanced7 min

