Open EugenKon opened 1 month ago
Hi @EugenKon, could you provide the links to the documentation you are referring to please, so I can ensure I am correctly comparing it with what you have detailed? Thanks.
@jrasell This one:
https://developer.hashicorp.com/nomad/docs/job-specification/check_restart#example-behavior
When the server task first starts and is registered in Consul, its health will not be checked for 90 seconds. This gives the server time to startup.
Proposal
grace 30s VS 5m (in case of database upgrade).
My interpretation of documentation is that grace instructs Nomad to not check the health of a service for this period at all. The logic can be summarized as follows:
I expected it is implemented a different "grace" strategy: discard failed health check while in grace period. The logic can be summarized as follows:
The difference is that in the first case Nomad always waits for 5 minutes, even if the service is ready and healthy 30 seconds later. Whereas in the second case, Nomad will mark the service as healthy as soon as it passes the health criteria -- 30 seconds after its start.