From c432e49c1e209b427943f1ae5bbba07ce1f7a074 Mon Sep 17 00:00:00 2001 From: Raja Subramanian Date: Wed, 12 Aug 2026 12:57:16 +0530 Subject: [PATCH] Set relay quota per participant at 12 default for dual peer connection + resume scenarios (#4745) --- config-sample.yaml | 4 ++++ pkg/config/config.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config-sample.yaml b/config-sample.yaml index b56ae1287..71888d572 100644 --- a/config-sample.yaml +++ b/config-sample.yaml @@ -300,6 +300,10 @@ keys: # # set UDP port range for TURN relay to connect to LiveKit SFU, by default it uses a any available port # relay_range_start: 1024 # relay_range_end: 30000 +# # caps the number of concurrent relay allocations a single participant credential may hold. +# # prevents one authenticated participant from exhausting the shared relay-port range for everyone else. +# # defaults to 12; a value <= 0 disables the quota. +# per_user_relay_allocation_limit: 12 # # set external_tls to true if using a L4 load balancer to terminate TLS. when enabled, # # LiveKit expects unencrypted traffic on tls_port, and still advertise tls_port as a TURN/TLS candidate. # external_tls: true diff --git a/pkg/config/config.go b/pkg/config/config.go index 584d59269..71de31476 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -64,7 +64,7 @@ const ( // allocations a single participant credential may hold on the embedded TURN // server. It prevents one authenticated participant from exhausting the // shared relay-port range for everyone else. A value <= 0 disables the quota. - DefaultTURNPerUserRelayAllocationLimit = 4 + DefaultTURNPerUserRelayAllocationLimit = 12 ) var (