Spring MVC versus WebFlux
Spring WebFlux was brought in as part of Spring 5 to bring in a new alternative to existing Spring MVC. Spring WebFlux brings in non-blocking event loop style programming to provide asynchronicity.
Event loop was brought in and made famous by Node.js. Node.js was able to perform non-blocking operations using single-threaded JavaScript by offloading operations to the system kernel whenever possible. The kernel, being multithreaded, is able to do these offloaded operations and after successful execution notifies Node.js through callbacks. There is a constantly running process that checks the call stack (where operations are stacked which need to be executed) and keeps executing processes in First In, First Out (FIFO) manner. If the call stack is empty, it looks into the Event Queue for operations. It picks them up and then moves them to the call stack to be further picked for execution.
The following diagram shows what is in both web application frameworks:
Figure 1...