Setting up Spring Cloud Gateway
When creating complex applications with different services, we don’t want to expose all those services to consumer applications so that we can avoid unnecessary complexity exposure. To address this scenario, we can use Spring Cloud Gateway. Spring Cloud Gateway can be deployed in such a way that it’s the only component that’s accessible to consumer applications, while the rest of the services will be accessed either internally or just from Spring Cloud Gateway. This is illustrated in Figure 4.5:
Figure 4.5: A typical Spring Cloud Gateway deployment
A note on deployment
Depending on the complexity and requirements of the solution, I recommend using additional networking protections, such as Layer 7 load balancers, web application firewalls (WAFs), or other protection mechanisms. For learning purposes, I will not describe them in this book and focus on Spring and Spring Cloud mechanisms instead.
...