In the single-server mode, one Workflow Server instance works with a single database. Multiple instances can be launched at the same time, it will not lead to errors, but such a system will work inefficiently due to the competition between instances. If horizontal scaling is needed, then better to use the multi-server mode.
Configuring Workflow Server
Configuring Workflow Server is really easy. The configuration should not contain the
IsMultiServer option in order to set Workflow Server
instance in the single-server mode, or it should be set to
false. Therefore, this mode is set as default for Workflow Server.
The rest of single-server settings can be changed in the Runtimes tab in the Settings page.
The single-server settings can be customized in the Runtimes tab in Setings section for Workflow Server. The following settings are available:
int TimerPeriod = 1000- period for the system timer to start work with process timers, in milliseconds.
int TimerMaxSequentialFailCount = 5- if an unhandled exception is detected during the system timer operation, the timer will turn off after the exception occurs successively the number of times specified by this setting.
bool DoNotRestoreOnStart = false- when launched in the single-server mode, by default, the recovery process after a failure launches after the restart. You can turn it off using this setting.
int TimerBatchSize = 100- the system timer works with a batch of process timers; it is the size of such a batch.
int MaxDegreeOfParallelismMultiplier = 1- the server tries to process timers and recovery processes in parallel, the level of parallelism is defined as the number of available processor cores multiplied by this value.
Features of Timers
Immediately after starting, the server finds the database and reads the timers scheduled to work at the given time. The timers are processed
in parallel, in batches of the size specified by the
TimerBatchSize parameter. The processing keeps on going until the end of all timers
which are scheduled to work at the current moment. Then, the system timer is set to restart after the
TimerPeriod interval. The timers are
processed in a separate thread, thus, calls to other methods are not blocked.
Service Timer and Recovery Procedure
If the server stops incorrectly, then might appear processes stuck in the Running status (the statuses of processes are
described here. The Running status will prevent further manipulation
of the process, therefore, it must be reset. The reset procedure starts once at the server startup. It can be disabled by
The recovery procedure and its customization are described here.