Understanding the Reactive Foundation
Discover why Spring Cloud Gateway is built on a non-blocking reactive stack and what that means for how requests flow through the gateway.
A Different Kind of Server
Unlike a traditional Spring MVC app, Spring Cloud Gateway runs on Spring WebFlux and Project Reactor. It uses a non-blocking, event-loop server (Netty) instead of one thread per request.
This design lets the gateway handle thousands of concurrent connections with very few threads.
Blocking vs Non-Blocking
In a blocking model, a thread waits idle while a backend responds. In a non-blocking model, the thread is freed and notified later when data is ready.
- Blocking: 1 thread tied up per in-flight request
- Non-blocking: a handful of threads serve many requests
All lessons in this course
- Gateway vs. Traditional Microservices
- Setting Up a Basic Gateway Project
- Defining Routes & Predicates
- Understanding the Reactive Foundation