.NET library for active/passive fail-over clustering

2.2k views Asked by At

I want to develop an application that connects to some input sources and processes the messages it reads (think BizTalk in principle, but not as heavy). For performance and reliability I would like to enable horizontal scaling of the service, obviously by utilising a shared storage (such as DB) to act as a message queuing mechanism.

However, threads that access resources such as email or disk folder cannot be scaled horizontally. Only one instance must be running at one time reading from that input source. (Further message processing business logic can of course reside on multiple nodes).

This is a perfect candidate for Active/Passive clustering. One node is considered "Active" and actively connects to the "single-instance" resources (such as email inbox), while others are "Passive". If the "Active" node dies, then the other "Passive" nodes elect a new "Active" node among themselves.

Now the question: is there a .NET library out there somewhere which helps one implement the usual failover clustering logic? (i.e. implementing the necessary heartbeat sending/detection, and "active" node election process). As I don't want to reinvent the wheel.

What I can see from the research done already:

  • BizTalk Server supports this functionality natively, but I am not using BizTalk as it's too heavy and expensive (but I want to emulate this functionality of it)
  • Windows Server supports Failover Clustering (in certain high-end versions like Windows Server 2008 Enterprise or Datacenter), but again this is an expensive solution (as each node would need the expensive license)
  • There is a lot of information on how failover algorithm should work, but I cannot see an open source implementation anywhere ... (only in commercial products sold at a premium)

I understand that it might be considered advanced and desirable functionality, and hence why commercial solutions for it are expensive. This is fine - if there is no open-source implementation or library out there, I will develop one on my own. I just don't want to spend the effort it it already exists.

UPDATE 12/02/2011: Found SAForum (http://www.saforum.org/link/linkshow.asp?link_id=214720), which is a website that publishes open specification for developing service availability concepts. There is also OpenSAF (http://www.opensaf.org/Welcome-to-OpenSAF%E2%84%A2~151213~14944.htm), and open-source C++ implementation of specifications on SAForum. Looks comprehensive, but is very heavy. It will take me a lot of time to wade through the specifications and documentation. It also covers a lot more than just fail-over, offering specification for full scalable distributed system (notifications, distributed events, locks, cluster management, etc.) ... Still no sign of a .NET implementation anywhere.

1

There are 1 answers

1
saille On

Surely developing this sort of advanced functionality on your own would be more expensive than buying it commercially. Unless your time is being donated to the project, and you have no deadline, I'd rule out writing this yourself.

To get high availability and horizontal scaling you need to write a lot of code. Testing that it works to the level that would be required in a high availability production environment will also take considerable effort. And even if you did all that, would you trust your own code over Microsoft's, which has accumulated run hours in the gazilions, and has been through the multiple versions that all software needs to go through to become mature and stable.

I know you were really asking about open source libraries, but the same argument applies - would you trust it, is it well tested, is it field proven, and who's butt can you kick when it falls dead?

Update: Well this was a few years ago and I guess I've softened my stance towards the viability of using open source for this sort of mission critical infrastructure, although I still believe having commercial support is essential, and I'd still avoid writing it yourself.

I would put in a plug here for Rabbit MQ as a high availability, highly scalable message bus, for the benefit of others reading this. Commercial support is available, and its based on open standards (AMQP). Client libraries are available for just about any major platform.