Configuring the Long Running Task Service
The Long Running Task Server supports load balancing.
* 
This example assumes that you want to move the RelexBusinessObjects.CalculationServer to a load-balanced cluster of machines. You can expand this procedure to move multiple servers to a single load-balanced cluster of machines. Or, you can move multiple servers to multiple load-balanced clusters of machines.
To configure the Long Running Task Server:
1. Ensure your network architecture is valid.
a. Have the Object Broker Server already installed somewhere.
* 
The Windchill Risk and Reliability database is installed only on the machine with the Object Broker Server.
b. Have a machine to use as a Singular Support Long Running Task (LRT) Server.
* 
If you are not load balancing the Object Broker Server, you can use this same machine as your Singular Support LRT Server. However, this guide assumes that the Object Broker Server and Singular LRT Server are different machines.
c. Have at least two machines ready to host Long Running Task Servers for each function or set of functions that you want to load balance.
d. Have a load balancing gateway server prepared for each function or set of functions that you want to load balance.
2. Install all components of the Enterprise Edition to the Object Broker Server.
3. Configure the Object Broker Server:
a. Create a new Windchill Risk and Reliability database, convert an existing database, or copy a RelEnt.rlx file that points to an existing database to the installation folder.
b. Stop and disable the following services:
Windchill Risk and Reliability Long Running Task Service
Windchill Risk and Reliability Alert Service
c. Stop the Windchill Risk and Reliability Object Broker Service. You will start it again later.
4. Install all the client components of the Enterprise Edition to the Singular Support LRT Server.
5. Configure the Singular Support LRT Server:
a. Modify appsettings.config to point to the RelEnt.rlx file on the Object Broker Server.
If the RelEnt.rlx file on the Object Broker Server is not accessible, you can copy it from there to this server.
b. Stop and disable the Object Broker Service.
c. Modify clients.config to point to the appropriate servers:
i. Modify the addresses for the following contracts to point to the Object Broker Server:
Relex.BusinessObjects.IService
Relex.Windchill.IWindchillIntegrationServer
Relex.Security.IAccessManager
Relex.Security.IUserGroupManager
ii. Modify the addresses for the following Singular Support LRT Server contracts to point to the Singular Support LRT Server:
Relex.BusinessObjects.IAttachmentServer
Relex.BusinessObjects.ICacheManager
Relex.BusinessObjects.RecordNumbers.IRecordNumberManager
Relex.AuditTrail.IAuditTrailServer
Relex.BusinessObjects.LRTJobs.ILRTJobNotifier
Relex.BusinessObjects.IServerTaskManager
Relex.BusinessObjects.IServerTaskProgressManager
Relex.BusinessObjects.ITaskManager
Relex.BusinessObjects.ITaskManagerClient
iii. Modify the addresses for the following Long Running Task Server contracts to point to the Singular Support LRT Server:
Relex.BusinessObjects.IEnterpriseUpsizeServer
Relex.BusinessObjects.IMagicButtonServer
Relex.Windchill.IWindchillIntegrationLRTServer
Relex.Report.Common.IReportGenerator
Relex.BusinessObjects.FileCreation.IFileCreationServer
Relex.BusinessObjects.ICaftaImport
Relex.License.ILicenseManager
iv. Modify the address for the Long Running Task Server contract for Relex.BusinessObjects.CalculationServer.ICalculationServer to point to the Long Running Task Gateway Server.
d. Modify RiskandReliability.Service.LongRunningTasks.exe.config to remove the load-balanced services from the Singular Support LRT Server.
* 
To accomplish this, you remove the <service> tag whose contract matches the contract being hosted on the Long Running Task Server. In this case, you would remove all services but Relex.BusinessObjects.CalculationServer.ICalculationServer.
e. Start the following services:
Windchill Risk and Reliability Alert Service
Windchill Risk and Reliability Long Running Task Service
6. Install all the client components of the Enterprise Edition to the first Long Running Task Server.
7. Configure the first Long Running Task Server:
a. Modify appsettings.config to point to the RelEnt.rlx file on the Object Broker Server.
If this RelEnt.rlx file is not accessible from the first Long Running Task Server, you can copy it from there to this server.
b. Stop and disable the following services:
Windchill Risk and Reliability Object Broker Service
Windchill Risk and Reliability Alert Service
c. Modify clients.config to point to the appropriate servers, referring to step 5.c.
d. Modify RiskandReliability.Service.LongRunningTasks.exe.config to remove the non-balanced services from the current Long Running Task Server.
* 
To accomplish this, you remove the <service> tag whose contract matches the contracts being hosted on the Long Running Task Server. In this case, you would remove Relex.BusinessObjects.CalculationServer.ICalculationServer.
e. Start the Long Running Task Service.
8. Install all the and client components of the Enterprise Edition to the second Long Running Task Server.
9. Configure the second Long Running Task Server:
a. Modify appsettings.config to point to the RelEnt.rlx file on the Object Broker Server.
If this RelEnt.rlx file is not accessible from the second Long Running Task Server, you can copy it from there to this server.
b. Stop and disable the following services:
Windchill Risk and Reliability Object Broker Service
Windchill Risk and Reliability Alert Service
c. Modify clients.config to point to the appropriate servers, referring to step 5.c.
d. Modify RiskandReliability.Service.LongRunningTasks.exe,config to remove the non-balanced services from the current Long Running Task Server.
* 
To accomplish this, you remove all <service> tags whose contracts do not match the contracts being hosted on the second Long Running Task Server. In this case, you would remove all but Relex.BusinessObjects.CalculationServer.ICalculationServer.
e. Start the Long Running Task Service.
10. Set up the LRT Gateway Server to refer to both the first and second Long Running Task Servers. As explained in Load Balancing Gateway, how you do this depends on the type of load balancer you are using.
11. Modify the Object Broker Server to point to the Singular Support LRT Server and the LRT Gateway Server.
* 
To accomplish this, you modify clients.config as per step 5.c, excluding only the first part for pointing to the Object Broker Server.
12. Restart the Object Broker Service.
13. Modify the Web Server to point to the Singular Support LRT Server and the LRT Gateway Server.
* 
To accomplish this, you modify clients.config as per step 5.c, excluding the first part for pointing to the Object Broker Server.
14. Modify bindings.config to support ‘best practice’ TCP load balancing:
a. For connectionPoolSettings, enter the values that meet your needs.
b. For idleTimeout, indicate how long Windchill Risk and Reliability is to wait before closing an open connection that is idle.
c. For leaseTimeout, indicate how long Windchill Risk and Reliability is to wait before reopening a current connection.
The RelexBusinessObjects.CalculationServer should now be load balanced across both Long Running Task Servers. You can repeat this same process to move other servers to their own load-balanced cluster of machines.
Alternately, you can load balance multiple servers on the same cluster of machines:
1. Remove their <service> tags from RiskandReliability.Service.LongRunningTasks.exe.config on the machine hosting the Singular Support LRT Server machine.
2. Add their <service> tags to the same file on the two machines hosting the two Long Running Task Servers.
3. Modify all of the clients (Web Server and Object Broker Servers) to point to the LRT Gateway Server instead of the Singular Support LRT Server for that contract.