Stabilize VPN flow pressure heartbeat

This commit is contained in:
2026-05-16 13:31:31 +03:00
parent c1f8840235
commit 3c139d307c
2 changed files with 5 additions and 0 deletions
@@ -3265,6 +3265,9 @@ func heartbeatPayload(cfg config.Config, identity state.Identity, meshState *syn
if meshState != nil && meshState.VPNFabricSessionDialStats != nil { if meshState != nil && meshState.VPNFabricSessionDialStats != nil {
report["dial_stats"] = meshState.VPNFabricSessionDialStats.Report(observedAt) report["dial_stats"] = meshState.VPNFabricSessionDialStats.Report(observedAt)
} }
report["flow_pressure"] = vpnFabricFlowPressureReport(vpnruntime.FabricFlowSchedulerSnapshot{
PressureLevel: "nominal",
})
if meshState != nil && meshState.VPNFabricIngress != nil { if meshState != nil && meshState.VPNFabricIngress != nil {
ingressSnapshot := meshState.VPNFabricIngress.Snapshot(identity.ClusterID) ingressSnapshot := meshState.VPNFabricIngress.Snapshot(identity.ClusterID)
report["flow_pressure"] = vpnFabricFlowPressureReport(ingressSnapshot.FlowScheduler) report["flow_pressure"] = vpnFabricFlowPressureReport(ingressSnapshot.FlowScheduler)
@@ -474,6 +474,8 @@ Heartbeat VPN fabric transport reports now include a compact
recovery timing, reason counts, and recommended per-class windows. recovery timing, reason counts, and recommended per-class windows.
Nodes advertise the `vpn_fabric_flow_pressure` capability when that heartbeat Nodes advertise the `vpn_fabric_flow_pressure` capability when that heartbeat
summary is available. summary is available.
When the VPN fabric ingress runtime has not been initialized yet, the heartbeat
still emits a nominal `flow_pressure` summary for schema stability.
Endpoint ranking treats `capacity_limited` observations as a soft pressure Endpoint ranking treats `capacity_limited` observations as a soft pressure
penalty instead of a hard recent failure, enabling load spreading without penalty instead of a hard recent failure, enabling load spreading without
marking the carrier unhealthy. marking the carrier unhealthy.