Zuul proxy as the API gateway

In most microservice implementations, internal microservice endpoints are not exposed outside. They are kept as private services. A set of public services will be exposed to the clients using an API gateway. There are many reasons to do this:

  • Only a selected set of microservices are required by the clients.
  • If there are client-specific policies to be applied, it is easy to apply them in a single place rather than in multiple places. An example of such a scenario is the cross-origin access policy.
  • It is hard to implement client-specific transformations at the service endpoint.
  • If there is data aggregation required, especially to avoid multiple client calls in a bandwidth-restricted environment, then a gateway is required ...

Get Spring: Developing Java Applications for the Enterprise now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.