Stabilize QUIC pressure snapshots
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"crypto/x509"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
@@ -412,6 +413,15 @@ func (t *QUICFabricTransport) Snapshot() QUICFabricTransportSnapshot {
|
||||
snapshot.CapacityPressurePercent = (snapshot.ActiveStreams * 100) / capacity
|
||||
}
|
||||
}
|
||||
sort.Slice(snapshot.Connections, func(i, j int) bool {
|
||||
if snapshot.Connections[i].PeerID != snapshot.Connections[j].PeerID {
|
||||
return snapshot.Connections[i].PeerID < snapshot.Connections[j].PeerID
|
||||
}
|
||||
if snapshot.Connections[i].Endpoint != snapshot.Connections[j].Endpoint {
|
||||
return snapshot.Connections[i].Endpoint < snapshot.Connections[j].Endpoint
|
||||
}
|
||||
return snapshot.Connections[i].CertSHA256 < snapshot.Connections[j].CertSHA256
|
||||
})
|
||||
return snapshot
|
||||
}
|
||||
|
||||
|
||||
@@ -427,6 +427,8 @@ QUIC fabric snapshots now include per cached connection pressure, endpoint, and
|
||||
saturation state; VPN fabric endpoint ranking consumes that live local pressure
|
||||
before stream-limit rejection, spreading new sessions away from already busy
|
||||
QUIC carriers.
|
||||
Per-connection QUIC snapshot entries are sorted by peer and endpoint so
|
||||
heartbeats and diagnostics stay stable across reports.
|
||||
Endpoint ranking treats `capacity_limited` observations as a soft pressure
|
||||
penalty instead of a hard recent failure, enabling load spreading without
|
||||
marking the carrier unhealthy.
|
||||
|
||||
Reference in New Issue
Block a user