Commit Graph

134 Commits

Author SHA1 Message Date
Paul Wells
54bf7e0dac allow configuring signal message buffer size (#1504)
* allow configuring signal message buffer size

* update psrpc
2023-03-08 17:34:14 -08:00
Paul Wells
2c93d55e5c add stream retry middleware for signalling (#1503) 2023-03-08 00:51:19 -08:00
Paul Wells
e22de045ba add signal psrpc service (#1485)
* add signal psrpc service

* update protocol dep

* refactor for cloud

* update psrpc

* pr feedback
2023-03-03 15:49:46 -08:00
cnderrauber
c367c36d8f Add config for active red encoding (#1476) 2023-02-28 10:44:47 +08:00
David Colburn
6da9e85636 Remove deprecated ingress rpc (#1439)
* remove legacy ingress rpcs

* remove from io service
2023-02-17 11:40:38 -08:00
Raja Subramanian
85a23bfffc Cleaning up availableLayers and exemptedLayers (#1407)
* WIP commit

* Send stream state paused only when it is paused due to bandwidth limitation.

When stream is resumed after a stream is paused, an active update is
sent. Note that this means if there are intervening events like
mute/unmute between pause and resume, resume will be sent.

* WIP commit

* fix compile

* WIP commit

* fixing tests

* clean up exempted layers

* clean up unused stuff

* correct comment

* Don't need ops queue as order is not important now

* static check

* kick off allocation when callbacks are set up, calling from receiver means callbacks may not be set up
2023-02-17 13:53:11 +05:30
shishirng
8856ce6422 Bump up interval for sending telemetry stats to 30 seconds (#1430)
Signed-off-by: shishir gowda <shishir@livekit.io>
2023-02-16 15:53:58 -05:00
Dan McFaul
1848a21eda add configurable environment value (#1421)
* add configurable prometheus env label

* Update pkg/config/config.go

Co-authored-by: Mathew Kamkar <578302+matkam@users.noreply.github.com>

* Update cmd/server/main.go

Co-authored-by: Mathew Kamkar <578302+matkam@users.noreply.github.com>

* Update config-sample.yaml

Co-authored-by: Mathew Kamkar <578302+matkam@users.noreply.github.com>

* set config.Environment value to dev when in dev mode

* be more precise for config-sample

---------

Co-authored-by: Mathew Kamkar <578302+matkam@users.noreply.github.com>
2023-02-15 14:41:44 -07:00
Trey Hakanson
ce07914e44 Allow for strict ACKs to be disabled or subscriber peer connections (#1410) 2023-02-10 22:51:03 +05:30
cnderrauber
bccf7a6842 Add ice mdns config (#1311)
* Add use_mdns config

* Update config-sample.yaml

Co-authored-by: David Zhao <dz@livekit.io>

Co-authored-by: David Zhao <dz@livekit.io>
2023-01-18 16:51:49 +08:00
Paul Wells
a052ebd644 Ingress psrpc (#1295)
* add ingress psrpc codegen

* use psrpc for ingress

* merge entity/info update psrpc services

* split update/delete ingress methods

* add race helper test

* add race context cancel test

* sync race result with mutex
2023-01-12 11:00:43 -08:00
cnderrauber
c393a5f8dd Add interface and ipfilter to udpmux option (#1270)
* Add interface and ipfilter to udpmux option

* validate external ip is accessable by client

* add context

* use external ip only for firefox

* fix mapping error

* Update pion/ice and use external ip only for firefox

* Use single external ip for NAT1To1Ips if validate failed

* update pion/ice
2022-12-30 16:01:12 +08:00
Benjamin Pracht
7778cdf2cd Do not use the egress version stored in redis to decide whether to enable PsRPC. Use a conf entry instead (#1262) 2022-12-30 09:32:55 +13:00
Raja Subramanian
41a906ce92 Using tracker type per source type which allows diffferent impl for different sources (#1269) 2022-12-28 14:07:53 +05:30
Raja Subramanian
2b031a5112 Introducing frame based stream tracker. (#1267)
* Split stream tracker impl from base

* slight re-arrangement of code

* fps based stream tracker

* MinFPS config

* switch back to packet based tracker

* use video config by default to handle sources without type
2022-12-28 13:00:21 +05:30
Raja Subramanian
1a48cc6a8b Track subscription operations per source track. (#1248) 2022-12-23 12:23:26 +05:30
cnderrauber
05132799a5 config for streamtracker (#1255) 2022-12-23 09:48:56 +08:00
David Zhao
b1ba917a01 Validate keys to ensure sufficient security. (#1217)
JWT tokens are signed with HS256, and they must be 256 bits or longer to
guarantee security.
2022-12-07 22:25:28 -08:00
Raja Subramanian
6bd5504bff Add option to issue full reconnect on a publication error. (#1214)
* Add option to issue full reconnect on a publication error.

Leaving the publication error timeout at 30 seconds as there
are some publications taking long. Also, there are cases
where the peer connection fails after 30 seconds. The peer
connection failure happens after publication error is detected.
But, 30 seconds is a good amount of time for publication to establish.

* prevent recursive lock
2022-12-06 14:46:59 +05:30
David Zhao
12ae179be2 Configurable RoomService execution timeout (#1206)
* API execution timeout is now configurable

In certain environments, it can take longer than the default 2s to
fully execute API requests. Making execution timeout a configurable option.

* do not expose api to YAML. internal for now.
2022-12-04 10:13:09 -08:00
cnderrauber
6711060cdb Add enable loopback candidate option (#1185) 2022-11-23 16:01:36 +08:00
Tom Xiong
e5dabd466e Support redis cluster mode (#1181)
* use redisConfig of protocol instead of redisConfig and use redis of protocol to create redis client to support redis cluster mode too
2022-11-22 10:36:43 -08:00
Mathew Kamkar
8c8a4d245c command to show help with hidden generated flags (#1171) 2022-11-16 19:20:22 -08:00
Mathew Kamkar
b2493b49f7 baseFlags do not need to be set (#1127) 2022-10-26 14:20:13 -07:00
Mathew Kamkar
26fe910e88 Generated CLI Flags (#1112) 2022-10-25 22:24:08 -07:00
cnderrauber
759e3bb1f2 Refine nat 1to1 mapping setting (#1094)
Now only set mapping when user_external_ip enabled or node_ip is
explicitly set. If multiple local address resolved to same external
ip, only the first one will be mapped to external, avoid candidate
conflict between different clients.
2022-10-17 16:11:52 +08:00
Raja Subramanian
33f5dbc501 Make strict mode a param (#1054)
So, a wrapping config (like cloud) can skip the strict mode check.
2022-09-29 13:07:32 +05:30
cnderrauber
4b630d2156 Add ipfilter to exclude ip from candidates gather (#1052) 2022-09-29 14:40:38 +08:00
David Zhao
9c8d9fca0c Enforce config fields, fail on unknown keys (#1051)
If/when users have a typo or misindentation in their config file, we
would have silently failed to assign the value and moved on.

With this change it'll error out, alerting user of the problem.
2022-09-28 22:13:52 -07:00
David Zhao
7e3155dcd6 ForceTCP only for supported clients (#997)
* ForceTCP only for supported clients

Revert back to standard if forceRelay with TLS fails
Don't force TLS unless it's configured

* fix lint
2022-09-09 18:14:36 -07:00
David Zhao
aa4f713d1e Document tcp fallback (#961)
* Updated docs around TCP fallback

* changed allowFallback to a pointer
2022-08-27 14:59:01 -07:00
cnderrauber
c20a91d2b2 enable red by default (#940)
* enable red by default

* fix test case
2022-08-22 17:40:12 +08:00
Raja Subramanian
49cf15cdca Fix filtering candidates (#901)
* Filter candidate after setting description

* comment

* Fix filtering candidates

- For offer/answer from remote, do filtering before setting remote
  description so that Pion does not see filtered candidates
- For offer/answer originating from server, do filtering after setting
  local description (comments in code) so that remote side does not
  see filtered candidates.
- Make logging a little consistent and use right context.

* Comment

* TCP fallback config and UT (broken now)

* log SDP only when preferring TCP

* Remove TCP fallback test attempt
2022-08-10 10:42:46 +05:30
Benjamin Pracht
5558aa5228 Make sure CreateIngest populates the stream_key and URL fields (#861) 2022-08-01 11:35:30 -07:00
David Zhao
a2bf32797b Allow binding HTTP server to specific address (#831)
Improves security when running with placeholder keys. Only allowing
access from loopback by default.
2022-07-13 23:58:33 -07:00
cnderrauber
0b630e15b6 disable ice lite by default (#784)
* disable ice lite by default
2022-06-24 15:06:07 +08:00
Alessio
558be854be Add turn relay start and end port configuration (#733) 2022-06-13 15:03:12 -07:00
cnderrauber
6ba034feae shorten the time cost for subscriber get media tracks (#747)
* set DownTrack's initial codec to first codec of potential codecs

* faststart on subscribe
2022-06-02 10:00:42 +08:00
cnderrauber
3a45f93fdd disable AV1 and VP9 by default (#735) 2022-05-29 12:30:42 +08:00
Brint E. Kriebel
5a74c1695d Add support for Redis Sentinel (#707) 2022-05-28 10:26:58 -07:00
cnderrauber
f958fbcc1c simulcast codecs support (#720)
simulcast codecs support 

Co-authored-by: David Zhao <dz@livekit.io>
2022-05-27 19:55:50 +08:00
David Zhao
a1caeeb8de Update WebRTC and DTLS with security fixes (#678)
* Update WebRTC and DTLS with security fixes.

* remove aggressive nomination settings (now default)

* fixed TURN issue
2022-05-10 18:27:16 -07:00
cnderrauber
8bb46637bb enable accept aggressive nomination by default (#644) 2022-04-22 12:41:43 +08:00
cnderrauber
124d628c0a add config to accept aggressive nomination (#642) 2022-04-21 18:32:18 +08:00
David Zhao
b821a0997d Use common logging init functions (#633)
* Use common logging init functions

* update protocol commit

* fix tests
2022-04-20 00:15:11 -07:00
David Zhao
431069af95 Rename StatsUpdateFrequency -> StatsUpdateInterval 2022-04-19 22:22:58 -07:00
David Zhao
282e2aed49 Increase frequency of status updates and longer availability threshold (#628)
* Increase frequency of status updates and longer avail. threshold.

* better fix.

* fix room close test failure due to slow peer connection Close

* Perform avg computation more frequently if data has changed
2022-04-19 22:18:00 -07:00
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