Share via


BizTalk: Restrict number of active instances of orchestration

Recently one of my colleagues asked me if it is possible to restrict the number of active instance of orchestration.

I was aware of singleton pattern, but the limitation with it is only one instance at any time.

I tried to figure out at MSDN, and  able to understand  in one way we can achieve it through singleton but not completely

http://msdn.microsoft.com/en-us/library/bb418739(v=bts.10).aspx

I tried to figure out if there is any possible way to achieve it and came to know that BizTalk has no built-in mechanism for controlling the number of instances of a given orchestration.. BizTalk engine does its own throttling to maximize system throughput.

As this was high level abstraction, I thought of digging more and able to collect few things, which i would like to share.

Out of the box with some default performance tuning settings describe the actual way of controlling the whole mechanism. We can figure it out these in the adm_serviceclass table of BizTalkMgmtDb. you might need to adjust these during your performance tuning. But be careful before touching these settings.

There are many keys but few key properties are listed below.

Name

Low Watermark

High Watermark

Low Sessionmark

High Sessionmark

XLANG/s (Orchestrations)

100

200

5

10

Messaging InProcess (InProcess Adapters)

100

200

2

5

MSMQT

100

200

10

15

Messaging Isolated (Isolated Adapters)

100

200

2

5

Low Watermark & High Watermark--à Low and high specify how many instances of that service type can execute at any one time. High Watermark points the maximum number of Orchestrations that can be in flight at any one time – once the BizTalk engine hits this watermark it will throttle back to the number specified by the Low Watermark and then resume normal operation

Low SessionMark  & High SessionMark---à Low and High Sessionmarks specify the number of concurrent database sessions that can be persisting inbound messages at any one time for each service type.

Do not change these setting, until there is any specific need.

The important thing to remember is that all of these settings are per processor, so if you have a dual processor box then 200 Orchestrations can be in flight at any time, quad processor boxes can have 400 and so on.