Tuning application server load balancing

Administrators can tune application server load balancing by editing application server load balancing properties. These properties affect:

This topic describes how you can tune load balancing and assumes you understand how Tarantella load balancing works.

Tuning properties used by all load balancing algorithms

The application server's relative power

The weighting property allows you to factor the relative power of the application servers in to the decision Tarantella takes as to where to launch an application. This is discussed in Configuring load balancing.

Tuning properties used by the CPU/memory-based algorithms

Load balancing ports

The primary Tarantella server in the array contacts the load balancing service on an application server on port 3579/tcp. This is controlled by the listeningport property.

The load balancing service sends updates to the primary Tarantella server on port 3579/udp. This is controlled by the probe.listeningport property.

These ports are registered ports and you should only change these properties if Tarantella Support asks you to. You will need to open these ports if you have a firewall between the primary Tarantella server and the application servers.

Tarantella server requests updates from an application server

The connectretries property is the number of times the primary Tarantella server tries to connect to an application server to request load updates. The interval between each attempt is controlled by the shorttimeout property. If the attempts to connect fail, the Tarantella server waits for the period of time controlled by the longtimeout property before trying again.

For example, using the defaults for these properties, the Tarantella server makes 5 attempts (connectretries) to contact the application server at 20 second intervals (shorttimeout). If all 5 fail, Tarantella waits 600 seconds (longtimeout) before making 5 more attempts at 20 second intervals.

You might want to change the timeout properties, for example, if your application server takes a long time to reboot.

The scaninterval property controls the period of time between scans of the Tarantella server's list of load-balanced application servers. The scan checks for the application servers that need to be contacted to request a load update (connectretries).

The sockettimeout property controls how long it is before a Tarantella server gets an error by trying to contact the load balancing service when there is no data available.

Frequency of the load calculation

The probe.samplerate and probe.windowsize properties control how often the load balancing service measures the application server's average load.

For example, the probe.samplerate is 10 seconds and the probe.windowsize is 5. After 50 seconds (5 x 10), the 5 measurements needed to calculate the average have been taken. After a further 10 seconds, the load balancing service takes a new measurement, discards the oldest measurement and then calculates a new average load.

You can increase/decrease the frequency of the calculation depending on how often you expect the application server load to change. For example, do users start applications at the start of the day and then close them at the end, or do they repeatedly start and stop applications.

Frequency of updates to the primary Tarantella server

The replyfrequency property controls the interval at which the load balancing service send updates to the primary Tarantella server.

The percentagechange property controls the minimum percentage change in CPU/memory use that must be reported to the primary Tarantella server. The load balancing service sends these updates as soon as the percentage change occurs. For example if an application server is running at 30% CPU load and the percentchange value is 10, an update occurs when the load is either 20% or 40%. The load balancing service takes into account sudden 'spikes' of activity and also makes adjustments when, for example a server reaches 81% CPU load and the percentagechange value is 20%.

The replyfrequency updates are sent even if the load does not change and even if there has been a percentagechange update. The basis for the percentagechange calculation is reset every time there is a replyfrequency update.

If there is no update from an application server for updatelimit x replyfrequency seconds, Tarantella considers the application server to be 'out of contact'. This means the application server is marked as unavailable to launch applications until the Tarantella server can re-establish contact with it.

Reliability of CPU/memory data

Tarantella considers the CPU/memory data to be too unreliable if there has been no update from the application server for maxmissedsamples x replyfrequency seconds.

Note The load balancing service sends updates even if the load does not change.

If the data is unreliable, the data is ignored when making the decision on where to launch an application. The net effect of this is to make the application server the last in the queue so that it will only be used to launch applications if no other server is available or suitable.

Frequency of updates to array members

The primary Tarantella server sends CPU/memory load updates to the other members of the array every maxmissedsamples x replyfrequency/2 seconds. This update takes place even if the load does not change.

If a secondary Tarantella server misses an update, it considers the load data it has to be unreliable and reverts to the Fewest application sessions method of load balancing. It uses this method until it receives a new update.

Related topics
  • Introducing application server load balancing
  • Configuring application server load balancing
  • Troubleshooting CPU/memory-based application server load balancing
  • Editing application server load balancing properties
  • Setting up a Tarantella Enhancement Module