Install Application Request Routing for IIS.
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"
See also MSDN Documentation
Disable Server Affinity because, we're using a custom
"sticky session" rule (as defined above).
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:
# 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: # # 184.108.40.206 rhino.acme.com # source server # 220.127.116.11 x.acme.com # x client host # localhost name resolution is handled within DNS itself. 127.0.0.1 localhost ::1 localhost 127.0.0.1 lh1 127.0.0.1 lh2
|Redis||Single Redis instance used by all TIService instances|
|LB Health check||Health check to TIService.||use /<SiteName>/tisapi/v1.0/global/health which returns http-204 if okay|
|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.
See also Setting up a cron job