Saturday, April 18, 2009

Clustering BizTalk Hosts

I went through this configuration a few years ago before I started blogging. Since I had to build a parallel environment recently, I have decided to post this information.


So why would I want to Cluster a BizTalk Host?
If your BizTalk group needs to be Highly Available, but you want to limit a Host to only have 1 Host instance. The reason that you may want to do this is to prevent message duplication. Message duplication may occur when you have *some* adapters running in multiple Host Instances. Adapters such as POP3, FTP, MSMQ/MSMQT and database adapters in polling scenarios.

For example, if you have two BizTalk servers and they both have a Host Instance on them called "FTP", both Host Instances will trigger a connection to this FTP server. If a file exists on the FTP server that matches your Receive Location's file mask, both of these host instances will attempt to retrieve a copy of this file. The reason for this is that the FTP protocol does not support file locking.


The solution to this problem is to cluster the "FTP" Host so that only one Host instance is capable of running at one time. Since the Host is clustered, it is capable of running on the servers that are configured in your cluster administration configuration. In this "Active/Passive" scenario, the Host instance does exist on the "Passive" node, it is just stopped. The core Windows 2003 Cluster functionality takes care of determining whether the Host Instance is online and if it is not, it will try to start it on another node.

So there is a little background on why you need to do this, I will now go through the process of setting this up inside of BizTalk.

The first thing that you need to do is create a BizTalk Host. You do this the same way you would create a Non-Clustered Host.
You then need to create a Host Instance on every node in your cluster. Otherwise you will get presented with the following error:
Once you have created all of the host instances, go into the "Hosts" menu, find the Host that you want to cluster, right mouse click and select "Cluster".

You will then be prompted to provide the Clustered Resource Group that you want this Host to belong to. A resource group basically allows you to group services, or resources. You can then spread these Resource groups across multiple servers.

Once this is complete, you will see a new "Generic Service" added to the Clustered Resource group that was previously selected.



So what does this look like inside of the BizTalk Admin console? I have included a non-clustered host instance "ServiceProcess" just to illustrate that the icons are different. The next clue is that one "EnterpriseClusteredSQLReceive" Host instance has the caption of (Active) beside it. What this means is that this Host Instance is actively running on node "01A". It is not possible to try and start this host instance on multiple servers at the same time.

So in this post I have over simplified the Windows 2003/2008 clustering process. I have attacked it from the perspective that the OS level clustering has already been put into place. Don't under estimate the effort required to do this. To learn more about this process, check out the following link: Improving Fault Tolerance in BizTalk Server 2006 by Using a Windows Server Cluster.

Also note that BizTalk Host Instance clustering is only available in BizTalk 2006 onward.


9 comments:

vaishraj said...

IS there anyway we can run POP3, FTP, MSMQ/MSMQT and database adapters and other non-clustered adapters in active/active setup avoiding issues we have with ftp/pop3 adapters and other adaptors.

We want to restrict to two servers only instead of two active/passive(clustered) and two active/active

Kent Weare said...

Not that I am aware of. Note though that your "passive" server can have non-clustered host instances running so it is not like it would be sitting idle. You can have Orchestrations, File Adapters, Web Services etc running on both nodes actively.

Liam Maher said...

Kent,

Can we use the wcf-oracle adapter in a clustered biztalk 2010 host for polling. I am seeing conflcting comments on the web on various forums where they say the wcf-oracle adapter is not supported by microsoft in a clustered host. MSDN documentation seems to say that all adapters can be clustered. Where would the idea it is not supported come from? Whats your opinion?

Kent Weare said...

Liam, this is news to me. You can run the oracle Adapter on a single server so I am not sure why this would be an issue.

I have run the oracle Adapter in a clustered host for around 4 years...no issues.

If you can post links I will review them.

Kent

Unknown said...

Kent,

Does MSDTC need to be clustered as a resource within the same group as the clustered hosts? In fact, does MSDTC need to be clustered on the BizTalk Servers at all for high-availability? I know it should be clustered on the associated SQL backend...

Kent Weare said...

Syed,

no it doesn't have to be. In fact they are in different groups in the images that you see in this post.

kent

Svavark said...

Are you saying that MSDTC does NOT have to be clustered.

That is BIG news since then I can use the passive node for "unclustered" host instances.
Better use of my resources.
When I installed Biztalk 2006 HA I followed Microsoft documentation and clustered the MSDTC service without thinking. Ever since I hvae beed wondering if this had to bee like this.

BTW. Good blog. I have learned a lot here.
Svavar

Kent Weare said...

Svavark,

No I am not saying that. Msdtc needs to be clustered but it doesn't have to be in the same cluster resource group as the clustered host instances.

Aryan said...

How can we cluster the TCP/IP adapter for High Availability? If my node that host TCP/IP adapter is down, then other node can cater the incoming messaging on TCP/IP adapter.