可以在没有Eureka/Ribbon的情况下使用Zuul Edge Server [英] Can Zuul Edge Server be used without Eureka / Ribbon
问题描述
我们拥有一个具有服务发现和负载平衡功能的基础架构(即具有STM和weblogic集群的服务器端).现在,我们正在重构为微服务.我们将需要一个API网关,该网关执行到其他微服务的基本路由. Netflix Zuul看起来不错,但是没有Eureka,我就无法让Zuul工作-但是我们不需要Eureka,因为我们已经有了服务发现和负载平衡功能.
We have an infrastructure with service discovery and load balancing (i.e. server side with STM and weblogic cluster). Now we are in the process of refactoring into micro-services. We would need an API gateway which does basic routing to other microservices. Netflix Zuul looks a good candidate however I could not get Zuul working without Eureka - but we do not need Eureka since we already have service discovery and load balancing in place.
- 是否可以在没有Eureka和Ribbon的情况下使用Zuul?
- 如果可以,请提供一些行会名称,因为Wiki中没有提及.
谢谢.
推荐答案
是的,完全有可能.您必须在配置类上使用@EnableZuulProxy
并进行如下配置:
Yes, it is totally possible.You have to use @EnableZuulProxy
on your config class and config it something like this :
zuul:
routes:
yourService:
path: /yourService/**
serviceId: yourService
ribbon:
eureka:
enabled: false
yourService:
ribbon:
listOfServers: localhost:8080
这篇关于可以在没有Eureka/Ribbon的情况下使用Zuul Edge Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!