There are two instances of an application: instance-1
and instance-2
.
Let us assume that
- instance-1 is reachable at
localhost:8090
- instance-2 is reachable at
localhost:9080
How do I configure zuul proxy so that --- First visit instance-1 and in case of any exception / failure, switch to instance-2
Note: Not using Eureka
I was able to get it work using hystrix with a facade controller and in the fallback, calling instance-2 via RestTemplate.
But I am looking for some better approach wherein the routing is taken care by Zuul along with mirroring of HTTPHeaders, HttpMethod and other request attributes.
If anyone have tried similar thing, please suggest me.