consul-registration-hook
consul-registration-hook copied to clipboard
Delay consul hook registration return
Deregistration in Consul can be quicker than registration and this creates a race condition in which the previous instances can be removed from Consul catalog before adding new ones are propagated to all client agents.
The "best effort" solution would be to at least check at the local agent whether the registered instance is among the ones in the catalog (consul doesn't cache the state, it always reaches the masters for catalog queries).