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 aNodeMetricssample per call. The default implementation (StaticProbe) is for tests; production callers ship a probe that reads/proc/loadavgor callssysinfothemselves (kept dep-free here so the metrics crate stays slim).AdaptiveLoadBalancer— picks a node weighted by inverse CPU load. Used byRemoteRouterConfigonce the metrics gossip wiring lands (Phase 10.B).
Modules§
- sys
sysinfo-backedsuper::MetricsProbe. Enabled with thesysinfo-probefeature.
Structs§
- Adaptive
Load Balancer - Router that picks the node with the lowest
cpu_loadfrom aClusterMetricssnapshot. Falls back to deterministic-by-address order when there are no metrics. - Cluster
Metrics - Node
Metrics - Static
Probe - Static probe — useful for tests and as a baseline when no real probe is wired. Returns the supplied values.
Enums§
- Metrics
Pdu - Wire shape for cross-node metric exchange.
Traits§
- Metrics
Probe - Sample local CPU/memory stats. Implementors decide how —
sysinfo,/proc/loadavg, or a hand-rolled JNI-style call. Deliberately dep-free here. - Metrics
Transport - Pluggable transport for metrics gossip. Mirrors
rakka_cluster::GossipTransportin spirit but works on raw addresses.
Functions§
- apply_
metrics_ pdu - Apply an inbound
MetricsPduinto aClusterMetrics. - gossip_
local_ metrics - Push the local probe sample to a peer. Caller drives this on a tick.