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

[Consul] Provide service ID to health check #97

Open
leoshusar opened this issue Feb 17, 2022 · 0 comments
Open

[Consul] Provide service ID to health check #97

leoshusar opened this issue Feb 17, 2022 · 0 comments

Comments

@leoshusar
Copy link

When service isn't shut down gracefully and therefore not deregistered from consul, when the new instance is spawned on the same host:port, Consul doesn't know which instance is actually alive. So all zombie instances send pings to the same healthy single instance and since they get 200, Consul thinks all instances are alive.
image

I tried to attach ServiceID either as query param or header (since Consul supports custom headers), and in the ping endpoint checked if the received ID matches the actual service ID.
If it matches, it returns 200, otherwise 404, and it works. Consul receives 200 only from the single alive instance.
image

So my proposal is to add either query param or some header with Convey's ServiceId to health checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant