Search code examples
spring-cloudnetflixnetflix-eurekanetflix-zuul

Can Zuul Edge Server be used without Eureka / Ribbon


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.

  1. Is it possible to use Zuul without Eureka and Ribbon?
  2. If yes please provide some guild-lines since the there's no mention about in the wiki.

Thanks.


Solution

  • 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