A router group that performs load balancing of messages to cluster nodes based on cluster metric data.
A router group that performs load balancing of messages to cluster nodes based on cluster metric data.
It uses random selection of routees based on probabilities derived from the remaining capacity of corresponding node.
The configuration parameter trumps the constructor arguments. This means that
if you provide paths
during instantiation they will be ignored if
the router is defined in the configuration file for the actor being used.
decides what probability to use for selecting a routee, based on remaining capacity as indicated by the node metrics
string representation of the actor paths of the routees, messages are sent with akka.actor.ActorSelection to these paths
dispatcher to use for the router head actor, which handles router management messages
A router pool that performs load balancing of messages to cluster nodes based on cluster metric data.
A router pool that performs load balancing of messages to cluster nodes based on cluster metric data.
It uses random selection of routees based on probabilities derived from the remaining capacity of corresponding node.
The configuration parameter trumps the constructor arguments. This means that
if you provide nrOfInstances
during instantiation they will be ignored if
the router is defined in the configuration file for the actor being used.
Any routees that are created by a router will be created as the router's children. The router is therefore also the children's supervisor.
The supervision strategy of the router actor can be configured with #withSupervisorStrategy. If no strategy is provided, routers default to a strategy of “always escalate”. This means that errors are passed up to the router's supervisor for handling.
The router's supervisor will treat the error as an error with the router itself. Therefore a directive to stop or restart will cause the router itself to stop or restart. The router, in turn, will cause its children to stop and restart.
decides what probability to use for selecting a routee, based on remaining capacity as indicated by the node metrics
initial number of routees in the pool
strategy for supervising the routees, see 'Supervision Setup'
dispatcher to use for the router head actor, which handles supervision, death watch and router management messages
Load balancing of messages to cluster nodes based on cluster metric data.
Load balancing of messages to cluster nodes based on cluster metric data.
It uses random selection of routees based on probabilities derived from the remaining capacity of corresponding node.
the actor system hosting this router
decides what probability to use for selecting a routee, based on remaining capacity as indicated by the node metrics
A MetricsSelector producing weights from remaining capacity.
A MetricsSelector producing weights from remaining capacity. The weights are typically proportional to the remaining capacity.
Current snapshot of cluster node metrics.
Local cluster metrics extension events.
Local cluster metrics extension events.
Published to local event bus subscribers by ClusterMetricsCollector.
Cluster metrics extension.
Cluster metrics 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.
Metrics extension settings.
Metrics extension settings. Documented in: src/main/resources/reference.conf
.
Default ClusterMetricsSupervisor strategy: A configurable akka.actor.OneForOneStrategy with restart-on-throwable decider.
Runtime collection management commands.
Provide sigar instance as SigarProxy
with configured location via ClusterMetricsSettings.
The exponentially weighted moving average (EWMA) approach captures short-term movements in volatility for a conditional volatility forecasting model.
The exponentially weighted moving average (EWMA) approach captures short-term movements in volatility for a conditional volatility forecasting model. By virtue of its alpha, or decay factor, this provides a statistical streaming data model that is exponentially biased towards newer entries.
http://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average
An EWMA only needs the most recent forecast value to be kept, as opposed to a standard moving average model.
the current exponentially weighted moving average, e.g. Y(n - 1), or, the sampled value resulting from the previous smoothing iteration. This value is always used as the previous EWMA to calculate the new EWMA.
decay factor, sets how quickly the exponential weighting decays for past data compared to new data, see http://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average
Loads JVM and system metrics through JMX monitoring beans.
Metrics key/value.
Metrics key/value.
Equality of Metric is based on its name.
Metrics sampler.
Metrics sampler.
Implementations of cluster system metrics collectors extend this trait.
A MetricsSelector is responsible for producing weights from the node metrics.
A MetricsSelector is responsible for producing weights from the node metrics.
MetricsSelector that combines other selectors and aggregates their capacity values.
MetricsSelector that combines other selectors and aggregates their capacity values. By default it uses [akka.cluster.routing.HeapMetricsSelector], [akka.cluster.routing.CpuMetricsSelector], and [akka.cluster.routing.SystemLoadAverageMetricsSelector]
Base class for MetricsSelector that combines other selectors and aggregates their capacity.
Base class for MetricsSelector that combines other selectors and aggregates their capacity.
The snapshot of current sampled health metrics for any monitored process.
The snapshot of current sampled health metrics for any monitored process. Collected and gossipped at regular intervals for dynamic cluster management strategies.
Equality of NodeMetrics is based on its address.
akka.actor.Address of the node the metrics are gathered at
the time of sampling, in milliseconds since midnight, January 1, 1970 UTC
the set of sampled akka.cluster.metrics.Metric
Loads metrics through Hyperic SIGAR and JMX monitoring beans.
Loads metrics through Hyperic SIGAR and JMX monitoring beans. This loads wider and more accurate range of metrics compared to JmxMetricsCollector by using SIGAR's native OS library.
The constructor will by design throw exception if org.hyperic.sigar.Sigar can't be loaded, due to missing classes or native libraries.
Provide sigar instance as SigarProxy
.
Provide sigar instance as SigarProxy
.
User can provision sigar classes and native library in one of the following ways:
1) Use Kamon sigar-loader as a project dependency for the user project. Metrics extension will extract and load sigar library on demand with help of Kamon sigar provisioner.
2) Use Kamon sigar-loader as java agent: java -javaagent:/path/to/sigar-loader.jar
Kamon sigar loader agent will extract and load sigar library during JVM start.
3) Place sigar.jar
on the classpath
and sigar native library for the o/s on the java.library.path
User is required to manage both project dependency and library deployment manually.
Cluster metrics extension provider.
Provide custom metrics strategy resources.
Command for ClusterMetricsSupervisor to start metrics collection.
Command for ClusterMetricsSupervisor to start metrics collection.
Command for ClusterMetricsSupervisor to stop metrics collection.
Command for ClusterMetricsSupervisor to stop metrics collection.
MetricsSelector that uses the combined CPU time metrics and stolen CPU time metrics.
MetricsSelector that uses the combined CPU time metrics and stolen CPU time metrics. In modern Linux kernels: CpuCombined + CpuStolen + CpuIdle = 1.0 or 100%. Combined CPU is sum of User + Sys + Nice + Wait times, as percentage. Stolen CPU is the amount of CPU taken away from this virtual machine by the hypervisor, as percentage.
Low CPU capacity => small node weight.
MetricsSelector that uses the heap metrics.
MetricsSelector that uses the heap metrics. Low heap capacity => small weight.
Factory for creating valid Metric instances.
Singleton instance of the default MixMetricsSelector, which uses [akka.cluster.routing.HeapMetricsSelector], [akka.cluster.routing.CpuMetricsSelector], and [akka.cluster.routing.SystemLoadAverageMetricsSelector]
Singleton instance of the default MixMetricsSelector, which uses [akka.cluster.routing.HeapMetricsSelector], [akka.cluster.routing.CpuMetricsSelector], and [akka.cluster.routing.SystemLoadAverageMetricsSelector]
Definitions of the built-in standard metrics.
Definitions of the built-in standard metrics.
The following extractors and data structures makes it easy to consume the NodeMetrics in for example load balancers.
MetricsSelector that uses the system load average metrics.
MetricsSelector that uses the system load average metrics. System load average is OS-specific average load on the CPUs in the system, for the past 1 minute. The system is possibly nearing a bottleneck if the system load average is nearing number of cpus/cores. Low load average capacity => small weight.