You have the option to customize the load-balancing metrics of web servers clustered with ClusterCATS software. This section describes how to customize metrics to your specific website implementation.
The JRun and ColdFusion servers record how long it takes to process each request, and can return metrics derived from this data, upon request. These metrics include the following:
To translate these metrics into a single load value for the web server, they must be weighed against a subjective measure of server performance - a maximum acceptable response time. The maximum indicates the upper threshold of performance at which a server is declared "busy" for load-balancing purposes. When a server reaches this critical threshold, ClusterCATS redirects further service requests away from the server until it becomes more responsive to its clients.
ClusterCATS software provides a further enhancement in load-balancing options. A ClusterCATS agent process probes a special page, getsimpleload.jsp
for JRun and getsimpleload.cfm
for ColdFusion, every five seconds, and records the round-trip time (RTT) for each request. From this data, it computes its own average RTT over a one-minute moving window. You can edit this file to customize load-balancing options for your application.
This external view of request time accounts for the processing time of the request itself, but, more importantly, for other system overhead included in reaching the web server and receiving an acceptable response. By factoring in external influences on web server responsiveness, such as network load, scheduling load, and disk I/O load, the ClusterCATS probe agent can adjust the load reported by JRun or ColdFusion, to generate a more realistic picture of the web server's performance for its clients.
For example, if the JRun server reports a light load of requests, but the probe agent finds significant round-trip times to and from the web server, then it reports a proportionally higher load for server than JRun reports.
The page ClusterCATS probes for load-balancing options, getsimpleload.jsp
for JRun and getsimpleload.cfm
for ColdFusion, is located in <CC_install_directory>/btauxdir
. The probe agent responds to output generated by this page and uses it to calculate the overall load, based on the weighting of the metrics set in the LOADTYPE
variable:
AVG_REQ_TIME
- calculates load based on the average service request time. The load is derived by dividing the request time by the maximum acceptable request time. This is the default metric.
ROUND_TRIP_TIME
- calculates load based on the round-trip time for the request. This metric leaves all load calculation to the probe agent.PREV_REQ_TIME
(ColdFusion only) - calculates load based on the time to process the last request to the server.
For servers that process database-intensive requests, ROUND_TRIP_TIME
is not a good indication of load, because JRun/ColdFusion processes the threads that calculate ROUND_TRIP_TIME
differently than queued database connection requests. With this in mind, if your web server uses many concurrent connections to a database, either use AVG_REQ_TIME
as your load type, or include a database call in getsimpleload.jsp/getsimpleload.cfm
to make this load type's results more indicative of actual conditions.
During processing, getsimpleload.jsp/getsimpleload.cfm
generates three significant output variables that are sent in response to the probe agent's HTTP query:
getsimpleload.jsp/getsimpleload.cfm
using one of the available load metrics. The load value identifies how busy the server is as a percentage of its total capacity.
AVG_REQ_TIME
metric. The default maximum is 8 seconds (8000 ms), but this value is arbitrary and you should customize it to fit the capacity and expectations of your particular website.If you increase the value of CCLOADMAX
, the server can take longer (on average) for each request before the server is declared busy. If you decrease CCLOADMAX
, the server's average request is shorter when the server is declared busy.
ROUND_TRIP_TIME
that the probe agent applies to the load metric supplied by CCLOADVALUE
.CCRTTPercent
is the second variable that you might change to customize your server's load metrics. It lets you "tune" the amount of external influence on server performance to calculate into the server's overall load value.
For example, increase CCRTTPercent
to apply a greater weighting to the ROUND_TRIP_TIME
metric in the overall load calculations. The default value of CCRTTPercent
is 0 (disabled). If you change the load type to ROUND_TRIP_TIME
, the default value of CCRTTPercent
is 100, which gives ROUND_TRIP_TIME
the maximum weighting.
If ClusterCATS gets an exception every time it processes getsimpleload.jsp
, you may have installed ClusterCATS before installing JRun. In this case, verify that the following is true:
JRunMetricThread.class
file is located in /jrun/lib/ext
/btauxdir
is configured on your web server. (This was created during installation, but you might have removed it.)