Greetings!
I have many small clusters with 3 Consul Masters and 3 Consul Agents each. I have the Consul service running on the host machine, while all my services runs in Docker Containers.
All my containers starts with a script that registers its services using the host's agent, and deregisters using the same agent right after the service dies.
That way works very, very well. I can put up and down as many containers as I want everytime I want and all nodes in the cluster are able to discover services (workers) through DNS, using consul.
Recently I had a poor performance on a very important service, because one node died (the machine froze completely) but DNS queries kept returning the services that were registered using this
machine's agent. I couldn't deregistering those services, as using other agents, the request (using HTTP API) didn't have any effect.
I had to wait for about 30 minutes until I had that server back online, deregistering all the services using it's own agent (and it worked), then starting my containers again so they would be re-registered.
So, is there a way to deregister a service that was registered on a agent that is now dead? Thanks in advance.