fix(server): shed overloaded group websocket fanout
This commit is contained in:
@@ -209,6 +209,10 @@ var (
|
||||
Name: "im_topic_shared_serialization_total",
|
||||
Help: "Shared WebSocket serialization events by pod, topic kind, and result.",
|
||||
}, []string{"pod", "kind", "result"})
|
||||
TopicBroadcastDropTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "im_topic_broadcast_drop_total",
|
||||
Help: "Realtime topic broadcasts skipped by pod, topic kind, role, and reason.",
|
||||
}, []string{"pod", "kind", "role", "reason"})
|
||||
ClusterM2PQueueWaitDuration = prometheus.NewHistogramVec(prometheus.HistogramOpts{
|
||||
Name: "im_cluster_m2p_queue_wait_duration_seconds",
|
||||
Help: "Time a master-to-proxy response waited in the multiplex outbound queue by pod and peer.",
|
||||
@@ -282,7 +286,7 @@ func init() {
|
||||
ClusterRouteTotal, ClusterProxyResponseTotal, InternalQueueEnqueueTotal, InternalQueueDepth,
|
||||
InternalQueueCapacity, InternalQueueCurrent, MessagePersistDuration, MessagePublishStageDuration, TopicQueueWaitDuration,
|
||||
TopicProcessDuration, TopicBroadcastDuration, TopicBroadcastTargets, TopicSharedSerializationTotal,
|
||||
ClusterM2PQueueWaitDuration, ClusterM2PQueueDepth, ClusterProxyQueueWaitDuration, WSReadDispatchDuration,
|
||||
TopicBroadcastDropTotal, ClusterM2PQueueWaitDuration, ClusterM2PQueueDepth, ClusterProxyQueueWaitDuration, WSReadDispatchDuration,
|
||||
PushDispatchQueueEnqueueTotal, PushDispatchQueueDepth, PushDispatchQueueWaitDuration,
|
||||
PushDispatchDuration, PushRecipientCount,
|
||||
KafkaMessagePersistTotal)
|
||||
@@ -339,6 +343,10 @@ func IncTopicSharedSerialization(kind, result string) {
|
||||
TopicSharedSerializationTotal.WithLabelValues(metricPodName(), normalizeLabel(kind), normalizeLabel(result)).Inc()
|
||||
}
|
||||
|
||||
func IncTopicBroadcastDrop(kind, role, reason string) {
|
||||
TopicBroadcastDropTotal.WithLabelValues(metricPodName(), normalizeLabel(kind), normalizeLabel(role), normalizeLabel(reason)).Inc()
|
||||
}
|
||||
|
||||
func ObserveClusterM2PEnqueue(peer string, depth int) {
|
||||
ClusterM2PQueueDepth.WithLabelValues(metricPodName(), normalizeLabel(peer)).Observe(float64(depth))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user