Configurable limit for number of tracks (#197)

* configurable node track limit

* sample config

* todos

* end of file new line

* default max num tracks

* bandwidth limit

* client message for limit exceeded node

* 10 Gbps default network limit
This commit is contained in:
Mathew Kamkar
2021-11-23 15:48:07 -08:00
committed by GitHub
parent 5cdb1c4848
commit e3c91de594
10 changed files with 117 additions and 16 deletions
+5
View File
@@ -77,6 +77,11 @@ func (r *StandardRoomAllocator) CreateRoom(ctx context.Context, req *livekit.Cre
// if already assigned and still available, keep it on that node
if err == nil && selector.IsAvailable(existing) {
// if node hosting the room is full, deny entry
if selector.LimitsReached(r.config.Limit, existing.Stats) {
return nil, routing.ErrNodeLimitReached
}
return rm, nil
}