Increase receiver loadbalance threshold when batch io enabled (#4899)

* Increase receiver loadbalance threshold when batch io enabled

With batch IO the send syscall moves to the BatchConn flush goroutine, so WriteRTP only
translates the packet and enqueues it. Increash the threshold to reduce

* lint
This commit is contained in:
cnderrauber
2026-09-23 13:54:40 +08:00
committed by GitHub
parent be944ee964
commit 6b2e3ece69
3 changed files with 19 additions and 1 deletions
+3
View File
@@ -543,6 +543,9 @@ func (r *RoomManager) StartSession(
EnableParticipantDataBlob: r.config.EnableParticipantDataBlob,
EnableRTPStreamRestartDetection: r.config.RTC.EnableRTPStreamRestartDetection,
EnableWarp: enableWarp,
MediaBatchIOEnabled: r.config.RTC.BatchIO.BatchSize > 0 &&
(r.config.RTC.ICEPortRangeStart == 0 || r.config.RTC.ICEPortRangeEnd == 0) &&
r.config.RTC.UDPPort.Valid(),
})
if err != nil {
prometheus.IncrementParticipantRtcCanceled(1, enableWarp, pi.Client.GetSdk())