Вопрос

I need to device a Failover mechanism for the following scenario. I have a WCF windows service which would be having 4 instances (Location "A" would have a Primary (PA) and Secondary (SA) and Location "B" would have two instances Primary (PB) and Secondary (SB) ). At any given time one instance in each location should be up and running( i.e. Active) and the other is Inactive. Considering one location at a time, Secondary(Inactive) should be able to PING the Primary (Active) for health info. and if its not found to be "healthy", then the Secondary(Inactive) should activate itself.

How different would the solution be if Primary and Secondary are considered to be on two different machines/same machine itself?

I would appreciate your expert opinions on how to achieve the same behavior.

Regards!

Это было полезно?

Решение

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

  1. Requires complex management - services need to be aware of each other which creates complexity and coupling.
  2. 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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top