[jboss-dev-forums] [Design of JBoss/Tomcat Integration] - JBossWeb-based load metrics for mod_cluster

pferraro do-not-reply at jboss.com
Mon Aug 18 14:47:23 EDT 2008


I've completed a basic set of load metric implementations for mod_cluster and would appreciate some feedback from the JBossWeb folks.  The relevant java code can be found here:
https://svn.jboss.org/repos/jbossas/trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/load/metric/

The specific LoadMetric implementations from JBossWeb sources are:
impl/ActiveSessionsLoadMetric.java
impl/BusyConnectorsLoadMetric.java
impl/ReceiveTrafficLoadMetric.java
impl/RequestCountLoadMetric.java
impl/SendTrafficLoadMetric.java

These implementations currently use mbean attributes to access the desired information.  Is there a better way to access this data?

Is there any other data available from JBossWeb (or elsewhere) that is suitable for a load balancing metric?

The load metrics from each configured source are periodically aggregated by the DynamicLoadBalanceFactorProvider:
https://svn.jboss.org/repos/jbossas/trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/load/impl/

When aggregating LoadMetrics, each load value (i.e. LoadMetric.getLoad()) is normalized as a ratio from some benchmark value (i.e. LoadMetric.getBenchmark()).  The weight of the metric (i.e. LoadMetric.getWeight()) is then applied to each normalized load value.  The normalized, weighted loads are added and stored in a queue of historical load values.  This history queue has a fixed length - old values will be removed to make room for new values.  Each calculation run divides the historical load values by a decay factor.  The final result of the load balance calculation run is the sum of the time-decayed load values from the history queue.  The decay factor (default = 2), and the length of the history queue (default = 10) are configurable.
Feedback on this logic is also appreciated.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171126#4171126

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171126



More information about the jboss-dev-forums mailing list