Install Application Request Routing for IIS.

Server Farm

Define a server farm and add your servers to the farm.

URL Rule 1

Edit the Inbound Rule

URL Rule 2

Edit the Inbound Rule "sticky session"

  • Condition: Match "Token" in HTTP header
  • Server Variable "LB_TOKEN" set to token value
  • Action: Route to Farm

See also MSDN Documentation

Server Affinity

Disable Server Affinity because, we're using a custom

"sticky session" rule (as defined above).

Load Balancing

Set the algorithm to "Server variable hash".

Use "LB_TOKEN" variable, which contains the sessions token.

Same host aliases

For multiple TI services on the same host, aliases must be defined in the Windows hosts file, so they can be referenced in ARR.

Windows hosts file: c:\windows\system32\drivers\etc\hosts 

# Copyright (c) 1993-2009 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
# # source server
# # x client host

# localhost name resolution is handled within DNS itself. localhost
::1 localhost lh1 lh2


Single Redis instance used by all TIService instances

Cron jobs

select a list of APPIDs comma-separated, empty means all instances, Synchronization via Redis lock.

Parallelism One for only one instance executes the cron job, All for all selected instances executes the cron jobs in parallel.

File Guard

Set key in TIService instance which executes the file guard.

Limitations up-to version 6.3



Cron jobs

Instances of TIService execute cron jobs independently.

Here is the procedure we suggest to ensure that the cron job is executed only by one instance.

  • Change the TIServiceWindowsService.exe.config on both instances by inserting System.Environment to entry CCXAllowedInstanceTypes.
  • In the TIS project create a data node with an formula operator reading out the server name on which the instance is running (System.Environment.MachineName).
  • Force an error in that data node on one machine, e.g. ((string)null).Length.
  • Create a solution runner script recalculating that node and using the action BreakNoData to terminate the execution if it takes place on the wrong machine.
  • Use the solution runner script within your cron job defintions.

See also Setting up a cron job (cronjob)