I think you should rethink your failover strategy.
There are a number of problem with configuring services to run in an active-passive failover/load balancing configuration
- Requires complex management - services need to be aware of each other which creates complexity and coupling.
- You can drop messages/requests - for example, service A falls over processing a message, then that message will not be processed by service B unless there is some way for service B to know that the message was not processed.
There are two modes of active-active service configuration which I have implemented: filter-in-turn or fully redundant.
In the filter-in-turn configuration, messages/requests will come in through a network load balancer to one of the services available.
In the fully redundant configuration (which is the one I prefer), messages/requests are broadcast to all available services at the same time. This means that you send multiple identical copies of the call to each service and they are processed concurrently.
Both these failover configurations will give you benefits, but I think the fully redundant configuration is better because you don't need a load balancer.