Spring MVC: model thread-per-request, mỗi request chiếm một thread (blocking).
Phù hợp cho: <5K concurrent users, business logic phức tạp, dùng Servlet-based libraries (JPA, Hibernate).
Dễ debug, dễ reason.
Spring WebFlux: non-blocking, event-driven (Netty).
Xử lý 100K+ concurrent với thread pool nhỏ.
Dùng Mono/Flux (Project Reactor) thay vì trả về giá trị trực tiếp.
Khi chọn WebFlux:
- high-concurrency I/O-bound — chat, streaming, real-time dashboard.
- microservices gateway cần forward nhiều request.
- WebClient cho HTTP calls (thay RestTemplate)
Không nên dùng WebFlux: CPU-bound tasks (không có lợi gì), hoặc đội dev chưa quen reactive.
Lưu ý quan trọng: Virtual Threads (Java 21) cho phép Spring MVC đạt concurrency tương tự WebFlux — là lý do nhiều team quay lại MVC.