How to Use Spring Cloud Gateway to Dynamically Discover Microservices
To understand a gateway, let’s first try to understand a microservice without a gateway.

Based on the above diagram, a client will have to access the services directly. This means the client will have to know the endpoint for each and every microservice and store it at the client end.