Skip to main content

Crate rakka_cluster_metrics

Crate rakka_cluster_metrics 

Source
Expand description

rakka-cluster-metrics. akka.net: Akka.Cluster.Metrics.

Phase 10 of docs/full-port-plan.md. Three layers:

  • ClusterMetrics — the per-node snapshot store (unchanged from prior version).
  • MetricsProbe — pluggable trait that produces a NodeMetrics sample per call. The default implementation (StaticProbe) is for tests; production callers ship a probe that reads /proc/loadavg or calls sysinfo themselves (kept dep-free here so the metrics crate stays slim).
  • AdaptiveLoadBalancer — picks a node weighted by inverse CPU load. Used by RemoteRouterConfig once the metrics gossip wiring lands (Phase 10.B).

Modules§

sys
sysinfo-backed super::MetricsProbe. Enabled with the sysinfo-probe feature.

Structs§

AdaptiveLoadBalancer
Router that picks the node with the lowest cpu_load from a ClusterMetrics snapshot. Falls back to deterministic-by-address order when there are no metrics.
ClusterMetrics
NodeMetrics
StaticProbe
Static probe — useful for tests and as a baseline when no real probe is wired. Returns the supplied values.

Enums§

MetricsPdu
Wire shape for cross-node metric exchange.

Traits§

MetricsProbe
Sample local CPU/memory stats. Implementors decide how — sysinfo, /proc/loadavg, or a hand-rolled JNI-style call. Deliberately dep-free here.
MetricsTransport
Pluggable transport for metrics gossip. Mirrors rakka_cluster::GossipTransport in spirit but works on raw addresses.

Functions§

apply_metrics_pdu
Apply an inbound MetricsPdu into a ClusterMetrics.
gossip_local_metrics
Push the local probe sample to a peer. Caller drives this on a tick.