Reputation: 2497
My website depends on server affinity. My setup has 2 nodes (A and B) serving client request.
Just before a deployment I want the NGINX load balancer to stop sending new requests to node B but all request that already have an affinity to node B be should be send to node B.
Is this possible with NGINX?
Upvotes: 2
Views: 622
Reputation: 934
You can use server "someserverip" down;
This is how we do it and it works great! It allows current requests to finish and then all new requests to go other servers. Then you deploy to that server and remove "down".
Upvotes: 0
Reputation: 98
Like @mikhailov told me in the comments, current requests will be finished, although the server is removed from the configuration. So here is the tactics:
When the deployment has finished:
Upvotes: 1