I am using ngnix to route traffic to proper application servers based on a cookie value. So one user always lands in a particular uptstream server.
Now I have multiple such uptsream servers. I want to send 503 for a upstream server when I am taking it down for maintenance purpose. What is the simplest way to do it?
If the application server is crashed we should get normal "could not connect to backend" error. So, I should get 503 for a upstream only when I am taking it down intentionally.