pub struct ReplicationMetrics {
pub acked_sequence: [Atomic<u64>; 2],
pub in_memory_sequence: [Atomic<u64>; 2],
pub bytes_sent: [Atomic<u64>; 2],
pub ack_latency_us: [Atomic<u64>; 2],
pub catching_up: [Atomic<bool>; 2],
pub evictions_total: Atomic<u64>,
}Expand description
Per-slot replication metrics exposed via the health endpoint.
The two-element arrays mirror the topology cap of 1 primary + 2 replica slots. Sized at compile time because the cluster shape is
fixed by the response gate’s MAX_CLUSTER_SIZE (see
crate::durability_policy::MAX_CLUSTER_SIZE); a Vec would add
a layer of indirection on every health-endpoint read for zero
gain.
Fields§
§acked_sequence: [Atomic<u64>; 2]Per-slot acked sequence (last sequence the replica confirmed as durable). Used to compute per-replica replication lag.
in_memory_sequence: [Atomic<u64>; 2]Per-slot in-memory sequence (last sequence the replica has
accepted into its pipeline pre-journal). Always
>= acked_sequence. Used by the multi-level durability gate
(see crate::durability_policy).
bytes_sent: [Atomic<u64>; 2]Per-slot bytes sent to the replica (cumulative). Includes catch-up and live streaming.
ack_latency_us: [Atomic<u64>; 2]Per-slot ack round-trip latency in microseconds. Updated on each ack by measuring elapsed time since the last batch send.
catching_up: [Atomic<bool>; 2]Per-slot catch-up state: true while streaming historical journal entries, false once the replica enters live mode.
evictions_total: Atomic<u64>Total eviction count (both slots combined). Incremented when the journal stage’s backpressure timeout fires.