This chapter covers:
- Implementing edge services with Spring Cloud Gateway and Reactive Spring
- Configuring circuit breakers with Spring Cloud Circuit Breaker and Resilience4J
- Defining rate limiters with Spring Cloud Gateway and Redis
- Managing distributed sessions with Spring Session Data Redis
In the previous chapter, you learned several aspects of building resilient, scalable, and cost-effective applications using the reactive paradigm. The reactive Spring stack will be the foundation for implementing an API gateway for the Polar Bookshop system. The API gateway is a common pattern in distributed architectures like microservices to decouple the internal APIs from the clients. When establishing such an entry-point to your system, you can also leverage it to implement cross-cutting concerns, such as security, monitoring, and resilience.
This chapter will teach you how to use Spring Cloud Gateway to build an Edge Service application, implementing an API gateway, and some of those cross-cutting concerns. You’ll improve the resilience of the system by configuring circuit breakers with Spring Cloud Circuit Breaker, defining rate limiters with Spring Data Redis Reactive, and using retries and timeouts just like you learned in the previous chapter.