Commit Graph

87 Commits

Author SHA1 Message Date
Brint E. Kriebel
f8ae219eab Add sort by option to node selector (#599)
* Add sort by option to node selector

Allow the final decision of a selected node to be based on different
sorting options rather than just random.

Add a `sysload`, `cpuload`, `rooms`, `clients`, `tracks`, and
`bytespersec` sorting options to select the appropriate room when
multiple are suitable for the chosen selector.

Add tests for sysload sort_by option

Closes: #598

* NodeSelector: rename "random" selector to "any"

Since the selector introduces limits but the final selection is now
based on the sort by value, the random selector name does not make
sense. Rename this selector to "any" to accurately reflect that it will
select any available no with no additional selection limits.

Allow the old setting "random" to point to the new selector name, but
print a deprecation warning message.
2022-04-14 01:25:36 -07:00
David Zhao
4475a028b6 Removed REMB references for publisher (#605) 2022-04-07 18:24:11 -07:00
cnderrauber
e35d75f7d7 disable av1 and vp9 support (#576) 2022-03-29 10:29:54 +08:00
cnderrauber
3959251837 add support for vp9 and av1 (#574) 2022-03-28 22:22:48 +08:00
cnderrauber
3352ee6b79 add size limit to metadata of room & participant (#566)
* add size limit to metadata of room & participant

* description in config-sample

* solve comments
2022-03-25 12:48:11 +08:00
cnderrauber
534cc01b85 refine dynacast pause delay (#558)
* refine dynacast pause delay

* fix test
2022-03-23 16:52:40 +08:00
cnderrauber
b98b828618 throttle quality come down (#556) 2022-03-23 15:27:00 +08:00
David Zhao
dfd3dade00 Disallow pause by default (#554) 2022-03-22 22:07:01 -07:00
Raja Subramanian
0a88dee95e A minimum channel capacity config (#549) 2022-03-22 13:13:48 +05:30
Mathew Kamkar
cac6d22a72 store cpu load in node stats (#524)
* store cpu load in node stats

* num cpus uint32

* cpu load selector test

* dep update
2022-03-16 14:51:22 -07:00
cnderrauber
e4c321de02 add interface filter config (#502)
* add interface filter config

* Update config-sample.yaml

Co-authored-by: David Zhao <david@davidzhao.com>

* better description

Co-authored-by: David Zhao <david@davidzhao.com>
2022-03-11 14:08:41 +08:00
Alex Beattie
96654e164a support Redis TLS Connection (#482)
* Add TLS for Redis connection

* Update to add tls flag
2022-03-02 22:17:29 -08:00
David Zhao
433a5cd8d1 Disable default node limits (#472)
* Disable default node limits

* removed unused vars
2022-02-27 16:54:39 -08:00
Raja Subramanian
0170cc1cb6 Staticcheck (#464)
Using `go get -u honnef.co/go/tools/cmd/staticcheck`
Uneaarthed a couple of real bugs
2022-02-25 12:04:08 +05:30
Raja Subramanian
0bbed7f0bd Use padding for probing (#434)
* WIP commit

* WIP commit

* WIP commit

* WIP commit

* WIP commit

* WIP commit

* WIP commit

* WIP commit

* Clean up

* Remove debug

* Remove unneeded change

* fix test

* Remove incorrect comment

* Reset probe after estimate trends down
2022-02-17 11:03:23 +05:30
Raja Subramanian
a6338992e8 Stop forwarding on congestion (#429)
* WIP commit

* comment out debug stuff
2022-02-11 09:17:53 +05:30
cnderrauber
f3572d2654 tune speaker detector more sensitive (#427)
* tune speaker detector more sensitive
2022-02-10 16:39:59 +08:00
David Zhao
81521f80db Support for custom TURN servers (#409)
Closes #271
2022-02-05 23:15:58 -08:00
David Zhao
e6c236357a Option to disable ICE-Lite to improve compatibility (#408) 2022-02-05 22:57:47 -08:00
David Zhao
126bb8867b Ability to disable auto-create (#361)
* setting to disable autocreate

* improve test reliability

* update comment

* update to address feedback
2022-01-21 09:57:36 -08:00
David Colburn
5bea9debb7 Code cleanup (#353) 2022-01-19 02:13:06 -08:00
David Zhao
88cad8f093 Generate cleaner configs (#347)
Also upgrade to v1.17 for docker builds
2022-01-17 23:54:04 -08:00
David Zhao
c122c98e4d Improved logging configuration (#342) 2022-01-15 10:28:03 -08:00
Mathew Kamkar
416ca80a8b get all local ip addresses (#340) 2022-01-14 17:49:45 -08:00
Raja Subramanian
98586c2490 A simple configuration for congestion control. (#305) 2021-12-31 00:26:29 +05:30
Raja Subramanian
107e7bbb39 Configurable bandwidth estimation side (#298)
* Fix tests

Add back adding track to publishedTracks for testing purposes.

* WIP branch

* Don't know why merge from `master` did not catch this change.

* WIP commit

* Hook up all the bits for TWCC to work

* Fix typo

* WIP commit

* Catch up to latest API

* Move RTP/RTCP info config

* Instantiate GCC/TWCC interceptor only when in use

* comment SSBWE parts

* RTCP feedback in publisher config
2021-12-30 20:09:03 +05:30
David Zhao
472f51cdba Fail IP lookup with STUN failure (#289)
Resolves #226
2021-12-27 16:43:13 -08:00
lukasIO
0d0a275101 Turn with external tls termination (#168)
* add TURN TCP port for plain tcp listener

* use externalTLS turn config option

* remove unused TCPPort config option
2021-12-14 13:36:02 -08:00
Mathew Kamkar
e3c91de594 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
2021-11-23 15:48:07 -08:00
cnderrauber
b7f32dfffd Handle multiple codecs in renegotiation (#191)
* Handle multiple codecs in renegotiation

update pion to v3.1.9 for answer same order of codec as publisher.
register enable codecs in subscriber peerconnectin created.

add codec parameter to buffer.bind
buffer should use the codec of TrackRemote as it's codec mime.

sent h264blankframe when DownTrack closing
2021-11-17 21:18:43 +08:00
cnderrauber
c4c93eaad6 Fix issue #159 (#195)
* Fix issue #159

use timestamp for AudeioLevel observer
change smoothinterval default to 2 for more sensitive
2021-11-16 21:59:15 +08:00
David Colburn
0c8fe361b2 Small refactor (#148)
* small refactor

* extra line

* fix room allocator test

* selector fakes not used

* keep decisions out of router

* put nodeId logic back

* fix room allocator test
2021-10-18 21:49:16 -05:00
David Colburn
1d626ba053 Update turn (#147)
* more generic turn server

* public turn realm name

* support turn cert itself in config

* remove cert/key from config

* double auth handler

* generate

Co-authored-by: Mathew Kamkar <578302+matkam@users.noreply.github.com>
2021-10-18 16:14:27 -05:00
Brint E. Kriebel
822f8c3944 Region Aware node selection fixes and enhancements (#141)
* cli: Allow setting the current node region with flag or env variable

Also add region to "starting LiveKit server" log.

* routing: Add region to node registration

Register the node's region on the selected router so it can be used for
region aware node selection.

Also add the region to the list-nodes output.

* regionaware: Set minDist to zero for the current node

If you don't set the minDist when leaving the loop early for a node that
matches the current region, the minDist value with still be at max. This
causes the the wrong node to be selected if the current node is the
first one the loop passes through.

Add a test that validates this change. The new test fails if this new
change is not in place.
2021-10-10 22:21:37 -07:00
Russ d'Sa
f6f5602bc4 consolidate on api key and api secret to describe our key pairs (#138)
* consolidate on api key and api secret to describe our key pairs

* tweak error message for the keys flag
2021-10-07 15:50:18 -07:00
David Zhao
c745f0a318 Region aware routing (#135)
* Region aware routing

* update config, fix spacing on commented out lines
2021-10-06 21:40:04 -07:00
David Colburn
2a3fb5f0e7 move logging to protocol (#109) 2021-09-09 00:45:42 -07:00
David Zhao
e82d50d717 Send explicit message to clients for mute/unmute. (#107)
* Send explicit message to clients for mute/unmute.

* documentation in config
2021-09-01 21:50:02 -07:00
David Colburn
2fd61531d2 small refactor (#104) 2021-08-30 18:22:11 -05:00
Mathew Kamkar
c437152e2b NodeSelector using system load metric (#94)
* use load when selecting nodes

* Apply suggestions from code review

Co-authored-by: David Zhao <david@davidzhao.com>

* sysload selector test

* wire nodeSelectorFromConfig

* fix tests

* Update pkg/routing/selectorsystemload_test.go

Co-authored-by: David Zhao <david@davidzhao.com>

* dz review: nits

Co-authored-by: David Zhao <david@davidzhao.com>
2021-08-26 15:24:39 -07:00
David Zhao
bcf6e15e07 SendData API & publishData permission (#88)
* SendData Server API

* SendData Server-API adjustments based on suggestions

* Update proto version

* enforce publishData permission

* go mod tidy

* fix go.mod

* go mod tidy

Co-authored-by: ChesterMing <89124853+ChesterMing@users.noreply.github.com>
2021-08-19 18:11:48 -07:00
David Zhao
9495646f1a webhooks support (#81) 2021-08-09 09:57:37 -07:00
David Zhao
a9c4851113 Fix external IP discovery. fix LeaveRequest during server disconnect (#72) 2021-07-28 21:33:34 -07:00
David Zhao
f8782fae3f Send stun servers to clients (#69)
* Send stun servers to clients

* use TURN/UDP as STUN servers
2021-07-26 15:43:26 -07:00
hn8
c682982af2 Update TLS port default as rfc5766 (#68) 2021-07-23 15:11:11 -07:00
hn8
06c44ca8f6 feat: support UDP in TURN (#61)
1. Add UDP option to TURN
2. GetLocalIPAddress default to IPv4
2021-07-19 09:21:59 -07:00
David Zhao
a80e8cf69f Enable passing in local IP, refactored IP detection (#48)
* Enable passing in local IP, refactored IP detection

* update docker server instructions
2021-07-11 08:42:11 -07:00
hn8
dcfe7eaf4f Enhancement: audio speakers (#44)
* refactor: active speakers

1. Observe the loudest adjusted with active ratio instead of linear average of decibel values
2. Follow RFC6465 to convert audio level from decibel to linear value.
3. Quantize audio level for stable slice comparison
4. Switch moving average algorithm from MMA to EMA to have the same center of mass with SMA
5. Minor: remove seenSids map allocation
6. Minor: minimize division arithmetic

* Update pkg/rtc/audiolevel.go

Co-authored-by: David Zhao <david@davidzhao.com>
2021-07-09 09:46:24 -07:00
David Zhao
4ec2959950 Use discreet ports by default due to write bottleneck (#40) 2021-07-06 15:08:46 -07:00
David Zhao
6751361187 Feature: codec restrictions.
In order to ensure clients are publishing with compatible codecs, the server can enforce codec restrictions.
2021-07-02 16:54:54 -07:00