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

Considering adding ModifyTime in all entries of catalog #3973

Open
pierresouchay opened this issue Mar 19, 2018 · 0 comments
Open

Considering adding ModifyTime in all entries of catalog #3973

pierresouchay opened this issue Mar 19, 2018 · 0 comments
Labels
type/enhancement Proposed improvement or new feature

Comments

@pierresouchay
Copy link
Contributor

Most entries in Consul catalog have two fields CreateIndex and ModifyIndex.

It would be very useful for services outside Consul gathering information about services to be able to know when those Index have been created. While they can access the index, it is not possible to find at what time the index was modified.

A few use cases:

  • a service has been added and some checks take time to start being passing => the load balancer would like to know since when the Checks are passing, and gradually add traffic to it to let the service warming up
  • being able to know when maintenance mode has been enabled
  • being able to know when a node has been registered
  • being able to know when a given service has been started (very useful in a PaaS)
  • Being able to show a service despite its status being critical during a determined period (for instance, we had recently a case of network saturation where node was marked as down since SerfHealth was flapping up/down since some other nodes could not reach it while opened connection still did work well)

While some of those use cases might be achieved using Node.MetaData or Service.Tags (or even better, using #3881 ), it is not always possible to do so, especially for the healthchecks.

Since healthchecks are driven by Consul itself, it is not possible to add this kind of metadata (in facts, it is possible for some using conventions, for instance by adding Timestamp in output of a HTTP HealthCheck, but not for all kind of HealtChecks anyway).

What do you think about adding a Timestamp (a uint64 for instance) to those Entries, or at least to healthchecks (and in that case, I would argue for a ModifyStateTime in order to know when the state of a HealthCheck did change the last time).

The PR is not that difficult to implement and would greatly simplify life with discovery, I'll be please to implement this if you might consider integrating it.

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Proposed improvement or new feature
Projects
None yet
Development

No branches or pull requests

2 participants