[
https://issues.apache.org/jira/browse/STRATOS-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13823285#comment-13823285
]
Imesh Gunaratne commented on STRATOS-197:
-----------------------------------------
Implemented a statistics reader interface to fetch different statistics from a
given load balancer. This interface will be used by the LoadBalancerExtension
class to read statistics from the load balancer and publish them periodically
to CEP. The time interval could be configured using a system parameter. As we
introduce new statistics parameters those could be added to the same interface:
package org.apache.stratos.load.balancer.extension.api;
/**
* Load balancer statistics reader interface.
*/
public interface LoadBalancerStatsReader {
/**
* Get in-flight request count of a given cluster.
* @param clusterId
*/
int getInFlightRequestCount(String clusterId);
}
Example Usage:
HAProxy haProxy = new HAProxy(executableFilePath, templatePath, templateName,
confFilePath);
HAProxyStatsReader statsReader = new HAProxyStatsReader();
LoadBalancerExtension extension = new LoadBalancerExtension(haProxy,
statsReader);
Thread thread = new Thread(extension);
thread.start();
> Introduce an Interface in Load Balancer Extension API for Statistics
> Publishing
> --------------------------------------------------------------------------------
>
> Key: STRATOS-197
> URL: https://issues.apache.org/jira/browse/STRATOS-197
> Project: Stratos
> Issue Type: Sub-task
> Reporter: Imesh Gunaratne
> Assignee: Imesh Gunaratne
> Fix For: 4.0.0 Alpha 1
>
>
> We need to introduce an interface in Load Balancer Extension API for
> statistics publishing. This could be implemented for different load balancers
> for publishing load balancing statistics to Complete Event Processing (CEP)
> Engine.
--
This message was sent by Atlassian JIRA
(v6.1#6144)