开发者

How to use .NET to coordinate/communicate between MSCS cluster nodes

I have to a develop a .NET Windows Service application that should run on an Active/Active cluster.

A Windows Service instance (one instance among many in cluster nodes) should listen to an IBM Websphere MQ and distribute the queue items to all cluster nodes (including the distributor node) based on the load on each service instance. When the primary node fails, anot开发者_如何学运维her service instance on secondary node should takeover the distribution task. Also, the distributor node should be able to control the concurrency level of TaskScheduler instance in Windows Service on all the nodes. For this, I should be able to communicate between cluster nodes without having a DB table or another queue.

I googled and found there is a C/C++ Platform SDK available. But, Is there any .NET API available to check the hearbeat and to perform intra-communication between nodes inside a cluster server? Or if you could suggest me a best way to implement this would be very helpful. Thanks.


There are probably much better platforms than Windows Clustering for this, but since you asked about Windows Clustering here's my take:

The MSCS/WSFC cluster API doesn't really provide a mechanism for intra-process communication beyond the fairly limited cluster database (really just a replicated registry key). But you could use the cluster API/tools to host the coordinator process and provide high availability.

The easiest way to do this would be to just build a normal Windows service for your coordinator and then use the built in "Generic Service" cluster resource/application type to monitor it. That will let you assign an IP address to the coordinator that will follow it around the cluster. Note that moving the coordinator service will be disruptive, so if the node crashes that is hosting the coordinator, there will be downtime while it is started up on the surviving node.

I don't really see any reason to make the processing agents cluster aware. Just run them as services on each node, and let the coordinator monitor which ones are online.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜