-
Notifications
You must be signed in to change notification settings - Fork 621
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clean-up fabio service entries in Consul on dirty exit (#664)
* consul: fix nits Signed-off-by: Pires <pjpires@gmail.com> * docs: add registry.consul.register.deregistercriticalserviceafter option Signed-off-by: Pires <pjpires@gmail.com> * register: clean-up fabio service entries in Consul on dirty exit This is achieved by: - Adding a TTL check to any services fabio may register into Consul, including its own; - Repurpose the goroutine (that exists per service that fabio registers) that periodically guarantees the service is registered in Consul to also reset the respective TTL check clock; - Set a short deadline in Consul to remove the service in case the TTL check is `critical` after said deadline is expired (time is non-deterministic as fabio doesn't control when the Consul reaper runs); Signed-off-by: Pires <pjpires@gmail.com> * changelog: mention #663 and #664 Signed-off-by: Pires <pjpires@gmail.com>
- Loading branch information
Showing
5 changed files
with
80 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
docs/content/ref/registry.consul.register.deregisterCriticalServiceAfter.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
title: "registry.consul.register.deregisterCriticalServiceAfter" | ||
--- | ||
|
||
`registry.consul.register.deregisterCriticalServiceAfter` configures the time the | ||
service health check is allowed to be in state `critical` until Consul automatically | ||
deregisters it. | ||
If fabio is still running, the service will be re-registered almost immediately after | ||
being deleted by Consul. | ||
|
||
At the time of this writing, Consul enforces a minimum value of one minute and runs | ||
its reaper process every thirty seconds. | ||
|
||
The default is | ||
|
||
registry.consul.register.deregisterCriticalServiceAfter = 90m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters