2 ms·
Understand and document your termination and startup signals. Any self-healing setup must: 1. Identify the state of your app (starting, running, ready, etc).
by captn3m0 4y ago
Understand and document your termination and startup signals. Any self-healing setup must:
1. Identify the state of your app (starting, running, ready, etc).
2. Stop traffic once the server goes down.
Very often you'll have state confusion (sigterm triggered, but server kept accepting requests). Make sure your signal handling works well across both your ingress, and the server.
A nice and easy hack is to have a /status endpoint in all of your apps that returns:
1. the current commit deployed
2. the availability of dependencies (db reachable? db connected? any missing environment variables?).
3. Which instance/pod/server is serving this request. (Just returning hostname typically works)