The purpose of application server load balancing is to select the application server (host object) that will give the user the best performance for a particular application. When launching an application, Tarantella builds a list of candidate application servers using the application servers listed on the hosts tab for the application object. Tarantella then has to determine which of the candidates is the best one for the user. The decision takes into account:
This topic describes how these factors and your Tarantella configuration affect the choice of application server.
When launching an application, Tarantella checks its list of candidate application servers to see if any of them are currently unavailable. If an application server is unavailable, it is removed from the list.
Tarantella Administrators can mark an application server as being unavailable by unchecking the Available to run applications attribute for the host object in Object Manager. You can do this, for example, to make an application server unavailable during maintenance work.
If you are using Tarantella Advanced Load Management, the load balancing service sends regular keep alive packets to Tarantella. If these packets stop, Tarantella considers the application server to be 'out of contact' and treats the server as unavailable until the load balancing service makes contact again.
Tarantella uses intelligent array routing to ensure that connections between Tarantella servers and application servers take place over high-speed links.
Tarantella's Protocol Engines convert the native protocol (such as X11), which is used between the application server and the Tarantella server, into the Adaptive Internet Protocol (AIP), which is used between the Tarantella server and the client device. AIP is optimized for lower bandwidths and, in general, it's best to use high-speed links between Tarantella servers and application servers so they're "close" in network terms.
However, if your network includes slow links, you can optimize application usability by identifying the 'location' of each array member and each application server. Intelligent array routing tries to ensure that the Protocol Engine runs on a Tarantella server in the same location as the application server. You should make sure that all servers configured with the same location are connected by high-speed links.
You define the location of each array member in Array Manager, and the location of each application server in Object Manager. You can only define locations if you are using:
When launching applications, Tarantella takes into account whether the user is already running any applications on an application server. This is known as server affinity. Server affinity means that, if possible, Tarantella will launch an application on the same application server as the last application the user launched.
Note For server affinity to work efficiently, the applications must be associated with the same set of hosts.
Server affinity is expressed as a percentage and currently only two values are allowed:
0
- this means any running applications do not affect the
choice of application server.
100
- this means any existing application servers must be
re-used if they can run the selected application. This is the default value.
You change the server affinity value by running the following command:
tarantella config edit --tarantella-config-applaunch-appserveraffinity affinity_value
Note If you are using Windows applications, we recommend that you do not change this value, as using multiple application servers causes problems, especially with roaming profiles. There may also be licensing implications for running different applications in a suite of applications on different servers.
Tarantella allows you to factor the relative power of the application servers in to the decision as to where to launch an application.
The relative power is expressed as a percentage and by default all servers
have a value of 100. By editing the
weighting
load balancing property for your servers, you can
increase/decrease these weightings to increase/decrease
the likelihood of Tarantella choosing an application server.
You can use this to:
Example 1 - You have two application servers london and paris, paris has a weighting of 50 and london has a weighting of 100. If all the other application launch conditions are met and the servers currently have the same load, london is more likely to be chosen to launch the application.
Example 2 - You have 100 application servers and you want to make just one of them 'more powerful' than the others. Increase the weighting of that server to 200.
For more details on how the weighting is used, see the load calculations below.
Tarantella uses a load balancing algorithm to select the application server with the least load.
You set an array-wide default algorithm on the Load Balancing Properties panel of Array Manager. You can override the default by specifying a different algorithm for the application object. This allows you load balance applications in different ways.
Currently three algorithms are supported:
To use the CPU/memory-based algorithms, the array must have an Advanced Load Management license key and the Tarantella Enhancement Module must be installed and running on every application server.
Note You can only load balance Windows, X and character applications with the CPU/memory-based algorithms.
The Fewest application sessions algorithm allows Tarantella to choose the application server which is currently running the fewest number of application sessions. It is based on a simple count of the number of application sessions being hosted through Tarantella.
If you use either the CPU or memory-based algorithms, the Fewest application sessions algorithm is used as a fallback whenever there is a problem, for example:
This algorithm is the default and does not have to be licensed separately.
The application server london is currently hosting 10 application sessions and has a server weighting value of 100.
The application server paris is currently hosting 12 application sessions, and has a server weighting value of 100.
The application server load is calculated using the following formula:
number of application sessions x 100 /server weighting
The load value for london is:
10 x 100/100 = 10
The load value for paris is:
12 x 100/100 = 12
Assuming the other conditions for launching an application are met, Tarantella would chose london to launch the next two application sessions. If the server weighting value for london was decreased to 50, Tarantella would choose paris to launch the next 8 application sessions, because london's load is now 20 (10 x 100/50).
The Least CPU usage algorithm allows Tarantella to choose the application server with the most CPU idle and is suitable for applications that require many processor cycles.
The algorithm measures the application server's load in terms of its CPU capabilities (measured in bogomips) and by how much of its CPU is being used. These measurements are taken by the load balancing service.
The application server london has a bogomips measurement of 500, a server weighting value of 75 and has 25% CPU idle.
The application server paris has a bogomips measurement of 100, a server weighting value of 100 and has 50% CPU idle.
The spare capacity is calculated using the following formula:
(bogomips x cpu idle %) x weighting /100
The spare capacity for london is:
(500 x 25) x 75/100 = 9375
The spare capacity for paris is:
(100 x 50) x 100/100 = 5000
Assuming the other conditions for launching an application are met, london would be the chosen application server, even though paris is using less of its CPU and has a higher server weighting value.
The Most free memory algorithm allows Tarantella to choose the application server with most free virtual memory and is suitable for applications that require a lot of memory.
The algorithm measures the application server's load by comparing the application server's actual virtual memory with the amount of memory that is currently being used. These measurements are taken by the load balancing service.
The application server london has a server weighting value of 100 and has 250MB virtual memory free.
The application server paris has a server weighting value of 75 and has 500MB virtual memory free.
The spare capacity is calculated using the following formula:
virtual memory free x weighting /100
The spare capacity value for london is:
250 x 100/100 = 250
The spare capacity value for paris is:
500 x 75/100 = 375
Assuming the other conditions for launching an application are met, paris would be the chosen application server.