Thank you @AndyDoyle for this lightning article.
I wonder if I can use it in my scenario, where I would like to have different backend based on the presence or not of the session affinity cookie.
This is to provide a way to remove a backend computer from the pool without cutting existing sessions. So I need to make a difference between a request with the affinity cookie and one without. And unfortunately, there is no simple way for the gateway to have tree states for a backend server, namely:
- Down: serve no request
- Up and running: serve all kinds of requests
- Shutting down: serve only request with an affinity cookie.
The basic idea is to have two different backend configurations with the same backend pool but different custom health probes so can have different health status. In this way, I can direct requests without affinity cookie to the most restrictive configuration. So that when I want to remove a computer from the backed, I can first remove it from the restricted configuration by adjusting the answer to the health probe. In the way, new requests with affinity cookie will be directed to another computer of the pool, but requests with the affinity cookie will continue to be served by the initial server.
I will definitely have a try.
Thanks again.