Register a service as a backup/failover service

Dear Colleagues,

I have HostA and HostB which both register service XXX with Consul. The hosts both pass the health checks so a DNS query for “XXX.service.consul” returns 2 IP addresses in round-robin order.

Is there a way to tell Consul that HostB is really a backup/failover service, so while HostA is alive and healthy, HostB’s IP address should not show in DNS (i.e. should be excluded from DNS responses)?

It’s true I can assign different weights but this does not affect A records, only SRV records.

Have I asked something too trivial and stupid, or something technically impossible?

Maybe it’s due to weekend and everyone was enyoing it? Stay calm. The guys will answer your question. :wink:

Judging from being still “Open” think Consul cannot do what I was asking for.

OK, I see. Have you tried the third-party solution mentioned in the last post?

I have not, because it is not clear to me from the README how to make hobson return the IP address of a particular node (designated as master), and not just an arbitrary address (even consistently the same over time).