Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Consul TTLs and multiple checks. #149

Closed
wants to merge 1 commit into from
Closed

Add support for Consul TTLs and multiple checks. #149

wants to merge 1 commit into from

Conversation

burnison
Copy link
Contributor

@burnison burnison commented Apr 7, 2015

This may potentially close #57, depending on how the original author wishes to
solve the problem. On each refresh, Registrator will write the current timestamp into
the check's notes.

Further, this change also introduces the ability to have multiple health checks
types. For example, a TTL may be used in conjunction with a script. This allows
for a more reliable service discovery mechanism, reducing the risk of services
reclaiming old ports. These changes also open the door for a simple, native HTTP
check integration with Consul. Because Registrator doesn't currently have an API
to store the upstream state of the service (i.e. remote check IDs), the Consul
adapter filters the defined checks into an ordered list, which it then
correlates to the check ID in Consul based on index. Consul's API implementation
suggests this is safe; however, this behaviour is not documented.

Sadly, this breaks compatibility with Consul 0.4.x, which only supported one
service check per service.

This may potentially close #57, depending on how the original author wishes to
solve the problem. On each refresh, Registrator will write the current timestamp
into the check's notes.

Further, this change also introduces the ability to have multiple health checks
types. For example, a TTL may be used in conjunction with a script. This allows
for a more reliable service discovery mechanism, reducing the risk of services
reclaiming old ports. These changes also open the door for a simple, native HTTP
check integration with Consul. Because Registrator doesn't currently have an API
to store the upstream state of the service (i.e. remote check IDs), the Consul
adapter filters the defined checks into an ordered list, which it then
correlates to the check ID in Consul based on index. Consul's API implementation
suggests this is safe, however, this behaviour is not documented.

Sadly, this breaks compatibility with Consul 0.4.x, which only supported one
service check per service.
@sielaq
Copy link

sielaq commented May 16, 2015

+1

3 similar comments
@nathanleiby
Copy link

+1

@LordFPL
Copy link

LordFPL commented Aug 20, 2015

+1

@lsamayoa
Copy link

+1

@@ -21,6 +21,8 @@ All notable changes to this project will be documented in this file.
### Changed
- Overall refactoring and cleanup
- Decoupled registries into subpackages using extpoints
- Add full TTL support for Consul 0.5.0.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please mention that it breaks compat with Consul 0.4 in changelog

@progrium
Copy link
Contributor

progrium commented Sep 4, 2015

And rebase and we'll merge :)

@progrium progrium added this to the v7 milestone Sep 4, 2015
@amitripshtos
Copy link

+1

@bc-vincent-zhao
Copy link

@burnison, would you please rebase your branch so this PR can be merged. would love to see multiple types of consul health checks supported 😸

@panga
Copy link

panga commented Oct 13, 2016

+1

@burnison burnison closed this May 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consul TTL Health Check checkID?
9 participants