ColdFusion Enterprise provides you the option of customizing the load balancing metrics of Web servers clustered with Allaire ClusterCATS software. This section describes how to customize the metrics to your specific Web site implementation.
The ColdFusion server records the time each JSP page and servlet request takes to be processed and can return metrics derived from this timing data upon request. These metrics are:
For these time-based metrics to be translated into a single load value for the Web server, they must be weighed against a more subjective measure of server performance-a maximum acceptable response time. This maximum reflects the upper threshold of performance at which a server should be declared "busy" for load-balancing purposes. Once a server reaches this critical busy threshold, the ClusterCATS software will redirect further service requests away from the server until it becomes more responsive to its clients.
A further enhancement in load-balancing options is provided by the ClusterCATS software. A ClusterCATS agent process performs a probe of a special JSP page -getsimpleload.jsp
(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.
This external view of request time accounts for the processing time of the JSP page request itself, but, more importantly, for other system overhead involved in reaching the Web server and receiving an acceptable response back again. 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 the ColdFusion engine to create a more realistic picture overall of the Web server's performance for its clients.
For example, if the ColdFusion server is reporting a light load of requests, but the probe agent is seeing significant round-trip times to and from the Web server, then it will report a proportionally higher load for server and ColdFusion reported.
The probed JSP page is located at <CC_install_directory>/btauxdir/getsimpleload.jsp
. The probe agent responds to output generated by this page and uses it to calculate the overall load based on the weighting of the two available metrics set in the LOADTYPE
variable:
AVG_REQ_TIME
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
ROUND_TRIP_TIME
calculates load based on the round trip time for the request. This metric leaves all load calculation in the hands of the probe agent.
For servers that process database-intensive requests, ROUND_TRIP_TIME
is not a good indication of load because ColdFusion processes the threads that calculate ROUND_TRIP_TIME
differently than queued database connection requests. With this in mind, if you have a Web server that uses many concurrent connections to a database, either use AVG_REQ_TIME
rather than ROUND_TRIP_TIME
as your load type, or include a database call in getsimpleload.jsp
to make this load type's results more indicative of actual conditions.
During processing, getsimpleload.jsp
generates three significant output variables that are sent in response to the probe agent's HTTP query. This section describes these variables.
CCLOADVALUE
is the load calculated by getsimpleload.jsp
using one of the available load metrics. The load value identifies how busy the server is as a percentage of its total capacity.
CCLOADMAX
is the maximum acceptable time (in milliseconds) for a request to complete and marks the "busy threshold" for this server. In other words, this is the basis upon which a load percentage is calculated given the results of the AVG_REQ_TIME
metric. The default maximum is 8 seconds (8000 ms), but this value is arbitrary and should be customized to fit the capacity and expectations of a particular Web site.
CCLOADMAX
is one of two variables that you would typically change in getsimpleload.jsp
to customize your server's load metrics. If you increase the value of CCLOADMAX
, then the server can take longer for each request (on average) before the server is declared busy. If you decrease CCLOADMAX
, then the server's average request must be shorter before the server is declared busy.
CCRTTPercent
represents the percentage of the calculated average ROUND_TRIP_TIME
that the probe agent should apply to the load metric supplied by CCLOADVALUE
.
CCRTTPercent
is the second variable that you might change in getsimpleload.jsp
to customize your server's load metrics. It acts as a tuning knob to determine how much external influence on server performance should be calculated 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
, then the default value of CCRTTPercent
is 100, which gives ROUND_TRIP_TIME
the maximum weighting.
If you make changes to the getsimpleload.jsp
page while the ColdFusion server is running you must reload the page for your changes to take effect.
If ClusterCATS gets an exception every time it processes getsimpleload.jsp
, you might have installed ClusterCATS before installing ColdFusion. In this case, verify that the following is true:
ColdFusionMetricThread.class
file is located in the /ColdFusion/lib/ext
/btauxdir
is configured on your Web server. (This was created during installation but you might have removed it.)