Configuration for high availability
This configuration consists of a single messaging engine, running in a cluster, that can fail over to one or more alternative servers. A high availability configuration ensures that there is always a messaging engine running in the cluster, so that messages are always transmitted.
There are two ways to achieve this configuration:
- We can add a cluster to the service integration bus using messaging engine policy assistance, and use the high availability messaging engine policy. This procedure creates a single messaging engine for the cluster, which is configured to fail over to any of the other servers in the cluster. A new core group policy is automatically created, configured, and associated with the messaging engine.
- We can add a cluster to the service integration bus without using messaging engine policy assistance. One messaging engine is created automatically and the default service integration policy, "Default SIBus Policy", provides suitable behavior for high availability. The default service integration policy is a "One of N" policy where the messaging engine starts on the first available server in the cluster and can fail over to any other server in the cluster.
We can optionally change the configuration, for example, we want to use a primary server and a backup server, or we want the messaging engine to run on only a subset of the servers in a cluster. To change the configuration, create a new "One of N" core group policy and configure the policy for the messaging engine further. For example:
- Set an ordered list of preferred servers that the messaging engine can run on and fail over to.
- Specify whether the messaging engine can run on any server in the cluster, or only on those in the preferred servers list.
- Specify whether the messaging engine can fail back to a more preferred server when one becomes available.
After creating the new policy, use the match criteria to associate the policy with the required messaging engine.
It is not advisable to change the default service integration policy, "Default SIBus Policy", because those changes will affect all messaging engines that the policy manages.
There is no workload sharing in the high availability messaging engine configuration, because there is only one messaging engine to handle the traffic through the destination.
The following diagram shows a high availability messaging engine configuration in which the single messaging engine ME, with a data store, is running in a cluster of three servers. Each server is on a separate node, so that if one node fails, the servers on the remaining nodes are still available.
Each server in the cluster contains the messaging engine configuration, and creates an instance of the messaging engine so that the instance is ready to be activated if another server fails.
The message store for the messaging engine must be accessible by all the servers in the cluster. For a data store, the way to achieve this depends on the data store topology we use. If we use a networked database server, ensure that the database server is accessible from all servers in the cluster that might run the messaging engine. Alternatively, we can use an external high availability framework to manage the database using a shared disk.
Initially, the messaging engine runs in its preferred location of server1.
Figure 1. Highly available messaging engine configuration
The following diagram shows what happens if server1 fails. The messaging engine is activated on the next server in the preferred servers list, which is server2.
Figure 2. Highly available messaging engine configuration after server1 fails
The following diagram shows what happens if server1 and server2 fail. The messaging engine is activated on server3, because this is the only available server.
If we use messaging engine policy assistance and the high availability messaging engine policy, the list of preferred servers is set up automatically.
If we do not use messaging engine policy assistance and we want the messaging engine to use preferred servers, specify one or more preferred servers for the messaging engine. Whenever a preferred server is available, the high availability manager (HAManager) runs the messaging engine in it. When no preferred server is available, the messaging engine runs in any other available server. We can also set the Fail back option on the policy so that when a preferred server becomes available again, the HAManager moves the messaging engine back to it.
If we use messaging engine policy assistance and the high availability messaging engine policy, the messaging engine is not set to fail back.
Related:
High availability messaging engine policy Policies for service integration High availability Configure high availability and workload sharing of service integration Add a cluster as a member of a bus