Using Spring Cloud Gateway to Hide Microservices behind an Edge Server
In this chapter, we will learn how to use Spring Cloud Gateway as an edge server, to control what APIs are exposed from our microservices-based system landscape. We will see how microservices that have public APIs are made accessible from the outside through the edge server, while microservices that have private APIs are only accessible from the inside of the microservice landscape. In our system landscape, this means that the product composite service and the discovery server, Netflix Eureka, will be exposed through the edge server. The three core services, product
, recommendation
, and review
, will be hidden from the outside.
Spring Cloud Gateway is well-suited as an edge server for development and testing. In a production environment, a full-featured API management product such as Apigee, Kong Konnect, IBM API Connect, or MuleSoft Anypoint is typically used.
The following topics will be covered...