sensu-go
sensu-go copied to clipboard
Add api-serve-wait-time backend configuration
Adds an --api-seve-wait-time
flag (default 0) to allow users to configure a time in seconds to wait on startup before serving api requests.
When the backend is started apid will bind to the api port (8080 by default). With the exception of the /health
endpoint, all routes should return an http 503 along with a Retry-After
header indicating the api-listen-wait-time (not the time remaining so as to avoid a thundering herd.) After the wait time passes, apid will begin serving traffic as usual.
https://github.com/sensu/sensu-go/issues/4827 exposes details of this in a readiness endpoint to not leave users in the dark.
Why
Provides built-in support for the most successful approach to mitigate unstable backend startups documented here: https://github.com/sensu/sensu-enterprise-go/issues/2373