Load-Balancing config file

TSplus Load-Balancing config file is located at: “C:\Program Files (x86)\TSplus\UserDesktop\files\GatewayPortalLoadBalancing.ini”.

Here is an example file:

[Settings]

Activated=1

StickySessions=1

HeartbeatRefresh=60

LoadBalanceOnServerAssigned=0

 

[LoadComputation]

Users=50

CPU=20

RAM=70

IO=30

 

[Servers]

Server=SRV 1|gateway.company.com/~~srv1|https|443||enabled

Server=SRV 2|gateway.company.com/~~srv2|https|443||enabled

First section regroups global settings.

To enable it make sure “Activated” is set to “1”.

Same goes with “StickySessions” so that users having an existing disconnected session on an application server are automatically redirected to this specific application server.

The second section matches the AdminTool Load-Balancing GUI and regroups weights used to compute the load of each application servers.

Finally, the third section lists all the application servers in the Load-Balancing farm, with their title (“SRV 1”) displayed on TSplus Web Portal, their address (“gateway.company.com/~~srv1” is clearly a Reverse-Proxyfied address), protocol and port (“https|443”) and the status of the server (“disabled” would allow to temporarily remove an application server from the Load-Balancing farm.


---


Modifying Load-Balancing config file

We recommend using TSplus AdminTool GUI.

Should you want to automate this configuration, you might edit the Load-Balancing config file. Make sure to use a valid format, then after saving your changes to disk you will have to restart TSplus “Enterprise Service” Windows service.

You can do so with these two Windows commands:

> net stop SVCE

> net start SVCE

Restarting this service will cause a disruption in Load-Balancing feature, preventing new sessions to be opened, but it will not disconnect already active user sessions.


---


Reverse-Proxy config file

When working in combination with TSplus Load-Balancing and assuming you use TSplus built-in web server, TSplus Reverse-Proxy config file is located at: “C:\Program Files (x86)\TSplus\Clients\webserver\balance.bin” and can be safely edited with most text editors.

Here is an example file:

/~~srv1=192.168.1.11:443;

/~~srv1=192.168.1.11:3389RDPPORT;

/~~srv2=192.168.1.12:443;

/~~srv2=192.168.1.12:3389RDPPORT;

Every application server must have two lines, one for the web port and one for the rdp port.

The internal name (“srv1” here for instance) must match the internal name used in the Load-Balancing config file.

Make sure that every application server can be contacted from the gateway server. This usually required your corporate network router to be able to do some loopback routing, or more easily you might want to add a line in your gateway server’s “host” file so it becomes aware of his public internet domain name.

 

---


Modifying Reverse-Proxy config file

We recommend using TSplus AdminTool GUI.

Should you want to automate this configuration, you might edit the Reverse-Proxy config file. Make sure to use a valid format, then after saving your changes to disk you will have to reload the configuration in TSplus built-in web server.

You can do so by performing this http request, either by script or by opening a browser. Both script and browser must be running on the gateway server itself – for security reasons, the http request must come from the local server itself.

> http://127.0.0.1:80/w0j3?balance.bin

(assuming http port is 80).