we are designing an application infrastructure with the intention of having Zuul as an intelligent router for a Web application (and also micro services but that is orthogonal to this question).
I am struggling with understanding how Zuul wants to work and I'm disappointed that I can't find some informative overview so I can understand how to do what I want to do. Does anyone know of a reference like this?
We have two requirements that I'm having difficulty understanding how (and if) Zuul will handle.
We want to implement application version-based routing. In addition, if the client is in upgrade mode, we will return a "try again later" page.
We may have to live with sticky sessions for the Web app.
For version based routing, we will have access to micro-services that front a distributed cache of metadata available. In the cache we will have client information relative to the infrastructure. We can determine the client from the request URL.
So, I'm thinking we will do a client lookup in a pre filter and do something intelligent with that information in the routing filter. Can someone get me started with this?
For sticky sessions, I found the following:
This looks very clever to me and seems to be what I'm looking for. However, I'd like to better understand how this works. Can someone advise?
For your first requirement regarding version based routing, you can register your microservice with a version suffix. For e.g., In Eureka server, two different versions of service ABC will register as:
In Zuul, you can create routes based on URL and service ID. For, e.g.,