public class ClusterMetricsExtension extends java.lang.Object implements Extension
Cluster metrics is primarily for load-balancing of nodes. It controls metrics sampling at a regular frequency, prepares highly variable data for further analysis by other entities, and publishes the latest cluster metrics data around the node ring and local eventStream to assist in determining the need to redirect traffic to the least-loaded nodes.
Metrics sampling is delegated to the MetricsCollector
.
Smoothing of the data for each monitored process is delegated to the
EWMA
for exponential weighted moving average.
Constructor and Description |
---|
ClusterMetricsExtension(ExtendedActorSystem system) |
Modifier and Type | Method and Description |
---|---|
static ClusterMetricsExtension |
createExtension(ExtendedActorSystem system) |
static ClusterMetricsExtension |
get(ActorSystem system) |
static ClusterMetricsExtension$ |
lookup() |
ClusterMetricsSettings |
settings()
Metrics extension configuration.
|
SupervisorStrategy |
strategy()
INTERNAL API
|
void |
subscribe(ActorRef metricsListener)
Subscribe user metrics listener actor unto
ClusterMetricsEvent
events published by extension on the system event bus. |
ActorRef |
supervisor()
Supervisor actor.
|
void |
unsubscribe(ActorRef metricsListenter)
Unsubscribe user metrics listener actor from
ClusterMetricsEvent
events published by extension on the system event bus. |
public ClusterMetricsExtension(ExtendedActorSystem system)
public static ClusterMetricsExtension$ lookup()
public static ClusterMetricsExtension get(ActorSystem system)
public static ClusterMetricsExtension createExtension(ExtendedActorSystem system)
public ClusterMetricsSettings settings()
public SupervisorStrategy strategy()
Supervision strategy.
public ActorRef supervisor()
CollectionControlMessage
s to manage metrics collection at runtime.public void subscribe(ActorRef metricsListener)
ClusterMetricsEvent
events published by extension on the system event bus.metricsListener
- (undocumented)public void unsubscribe(ActorRef metricsListenter)
ClusterMetricsEvent
events published by extension on the system event bus.metricsListenter
- (undocumented)