Multiple Zuul routes to one service

EvilJinious1 picture EvilJinious1 · Feb 22, 2015 · Viewed 10.5k times · Source

Most of the examples that I see are one route definition to one service.

so this sort of thing:

zuul:
  routes:
    myserver:
      path: /mypath/**

Lets say that I want to route several routes to one service so in effect it would be like this:

zuul:
  routes:
    myserver:
      path: /mypath/**, /anotherpath/**

This isn't allowed in the configuration file and neither are you allowed to have the same route name twice. Is there any real way to do this?

Answer

spencergibb picture spencergibb · Feb 23, 2015

It may be possible with something like this, but I've not tried it

zuul:
  routes:
    myserver_mypath:
      path: /mypath/**
      serviceId: myserver
    myserver_another_path:
      path: /anotherpath/**
      serviceId: myserver