Cluster_Nodes

This sample demonstrates synchronization when one of the nodes in a cluster fails. To see how the synchronization works, the first run of cluster_nodes on node 0 must exit after a few seconds. When the sample is started again on node 0 and node 1, the instance on node 0 synchronizes the database content with node 1.

How to Run

In a console window run:

    cluster_nodes 2 0

Then in a second console window run:

    cluster_nodes 2 1

Now wait for the first instance to exit and then start it again:

    cluster_nodes 2 0

Note that the instance on node 1 has rank=1 while node 0 has rank=0. This avoids the MCO_E_CLUSTER_NOQUORUM error when node 0 is disconnected.

It is more instructive to run one instance in your development environment debugger, stepping through the code.

Related Topics Link IconRelated Topics