Consul with Spring Cloud Gateway - Inter Service Communication

时光总嘲笑我的痴心妄想 提交于 2020-02-07 06:01:27

问题


The setup: I have a set of Spring Boot based microservices that are fronted by Spring Cloud Gateway, meaning every request that comes from UI or external API client first comes to Spring Cloud Gateway and is then forwarded to appropriate microservice.

The routes are configured in Consul, and Spring Cloud Gateway communicates with Consul to get the routes accordingly.

Requirement: There is a need of some microservices communicating with each other with REST APIs. I would prefer this communication to happen via the Spring Cloud Gateway as well. This will help in reducing multiple services going to Consul for getting other service's details.

This means every service should know Gateway's detail at least. And there can be multiple instances of Gateways as well. How is this dealt with in bigger architectures?

Any example that I look up contains one service using Consul, or Gateway using the consul with one microservice. Couldn't understand how to extrapolate that design to a bigger system.

来源:https://stackoverflow.com/questions/54662179/consul-with-spring-cloud-gateway-inter-service-communication

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!