Commit Graph

440 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
cnderrauber
11ae7fdbb6 Don't switch candidate if signal closed when pc failed (#1498)
* Don't switch candidate if signal closed when pc failed

* change comment

* test case
2023-03-08 15:16:40 +08:00
lukasIO
958d2f8284 Add topics to data channel messages (#1489)
* Add topics to data channel messages

* update protocol
2023-03-07 10:41:37 +01: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
Benjamin Pracht
17ae1506f5 Chain twirpLogger and twirpRequestStatusHook properly for the Egress server (#1470) 2023-02-25 15:15:50 -07:00
David Colburn
3ac2a35c23 check nil video grants (#1463) 2023-02-23 11:30:59 -08:00
Haiyang Wang
15a9ad2b7a fix: unable to notify webhook when egress ending with status EgressStatus_EGRESS_LIMIT_REACHED (#1451) 2023-02-22 12:04:26 -08:00
Paul Wells
b35d64ae86 finish timed version migration (#1443)
* finish timed version migration

* update protocol dep
2023-02-18 12:08:08 -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
14a94fe693 Fix panic when closing room (#1428) 2023-02-16 11:59:13 +05:30
David Colburn
10c53e0ebb Move psrpc to protocol (#1426)
* move psrpc to protocol

* update checks

* update protocol

* update protocol ref

* blank line
2023-02-15 16:47:38 -08:00
David Colburn
c133b9f2e3 fix panic when output is missing (#1420) 2023-02-14 10:23:46 -08:00
David Zhao
ea12e1477f Update to go-redis v9. Fixed Redis cluster support (#1415)
* Update to go-redis v9. Fixed Redis cluster support
2023-02-12 22:22:21 -08:00
Raja Subramanian
2006359a97 move SDP to Debugw (#1413) 2023-02-12 22:56:43 +05:30
David Zhao
3e08ff1043 version 1.3.4 (#1411) 2023-02-09 23:31:42 -08:00
David Zhao
9a7ea7a2fa Close previous request channels when during initial retry (#1409)
So we don't leave abandoned requests hanging on the media instance
2023-02-09 17:27:33 -08:00
Dan McFaul
ad7e075c18 exit after panic (#1392)
* let panics crash

* Revert "let panics crash"

This reverts commit 8027cccadd.

* catch and log panics then os.Exit

* Recover only recovers, caller can exit

* only exit on pacic, still need Recover calls in goroutines
2023-02-09 16:33:22 -07:00
David Colburn
d2f0496223 list egress by id (#1404)
* list egress by id

* update proto ref
2023-02-09 00:10:54 -08:00
cnderrauber
8b6dab780c Add reconnect reason and signal rtt calculation (#1381)
* Add connect reason and signal rtt calculate

* Update protocol

* solve comment
2023-02-06 11:12:25 +08:00
David Zhao
be4764b93b Improve panic recovery to use participant logger. (#1375)
Also made IssueFullReconnect public
2023-02-02 14:55:50 -08:00
cnderrauber
7e5ba6a3b0 Improve connectivity check (#1366)
* Add Timer to detect dtls failure quickly

* Fix pc state check in timeout after ice

* More strict conditions to switch candidate type

* log for signal interuppt

* typo
2023-02-01 20:00:34 +08:00
Benjamin Pracht
30adc6ee15 Fix typo in twirp server status code parsing (#1361) 2023-01-31 17:43:59 -08:00
Raja Subramanian
71eac631a1 Log offer/answer close to WebSocket connection ingress/egress. (#1359) 2023-01-31 17:50:56 +05:30
Raja Subramanian
80c647ef15 Update PSRPC to 0.2.5 (#1357)
Not able to update cloud without this.
2023-01-31 14:11:44 +05:30
Benjamin Pracht
c6e8887ab8 Allow requesting a specific Egress Cluster Id (#1342) 2023-01-30 17:04:26 -08:00
David Zhao
9a1f4ab18b Allow /rtc/validate to return room not found message (#1344)
It's not always possible for WebSocket clients to obtain status code or
error messages returned during WS Upgrade. Moving autocreation validation
to an explicit interface in the validation step so the /rtc/validate
would be able to return an appropriate message.
2023-01-29 21:41:44 -08:00
David Zhao
2fa46e2df4 Retry initial connection attempt should it fail (#1335)
Sometimes the initial selected node could fail. In that case, we'll give it a few more attempts to locate a media node for the session instead of failing it after the first try.
2023-01-25 22:59:57 -08:00
David Zhao
bd39a96eac Tweak call stack depth to show more helpful error lines (#1333) 2023-01-25 15:35:18 -08:00
David Zhao
cd6b8b80b9 feat: SubscriptionManager to consolidate subscription handling (#1317)
Added a new manager to handle all subscription needs. Implemented using reconciler pattern. The goals are:

improve subscription resilience by separating desired state and current state
reduce complexity of synchronous processing
better detect failures with the ability to trigger full reconnect
2023-01-24 23:06:16 -08:00
David Colburn
e31b25300d update psrpc (#1312) 2023-01-18 13:52:03 -08:00
Benjamin Pracht
edc39da0b1 Add TwirpRequestStatusReporter twirp server hook to count requests (#1309) 2023-01-18 11:53:20 -08:00
David Colburn
a87107a0f3 IOInfo service (#1305)
* IOInfo service

* only start if not nil

* use ctx in updateEgressInfo

* updates

* fix merge
2023-01-16 16:26:03 -08:00
David Zhao
732309a8c1 Added track success & muted events (#1308)
Related to livekit/protocol#273

This PR adds:
- ParticipantResumed - for when ICE restart or migration had occurred
- TrackPublishRequested - when we initiate a publication
- TrackSubscribeRequested - when we initiate a subscription
- TrackMuted - publisher muted track
- TrackUnmuted - publisher unmuted track
- TrackPublish/TrackSubcribe events will indicate when those actions have been successful, to differentiate.
2023-01-15 15:40:20 -08:00
David Zhao
17236799bb Fix handling of non-monotonic timestamps (#1304)
* Fix handling of non-monotonic timestamps

Timed version is inspired by Hybrid Clock. We used to have a mixed behavior
by using time.Time:
* during local comparisons, it does increment monotonically
* when deserializing remote timestamps, we lose that attribute

So it's possible for two requests to be sent in the same microsecond, and
for the latter one to be dropped.

To fix that behavior, I'm switching it to keeping timestamps to consolidate
that behavior, and accepting multiple updates in the same ms by incrementing ticks.

Also using @paulwe's idea of a version generator.
2023-01-12 11:57:26 -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
Dan McFaul
4d6f0cd0f7 Stats collect v2 (#1291)
* initial commit

* add correct label

* clean up

* more cleanup on adding stats

* cleanup

* move things to pub and sub monitors, ensure stats are correctly updated

* fix merge conflict

* Fix panic on MacOS (#1296)

* fixing last feedback

Co-authored-by: Raja Subramanian <raja.gobi@tutanota.com>
2023-01-11 14:49:50 -07:00
Benjamin Pracht
0ca80a4fa7 Fix log statement in egress service (#1301) 2023-01-11 11:42:47 -08:00
cnderrauber
25debc6d35 add reconnect response to update configuration while reconnecting (#1300)
* add reconnect response to update configuration while reconnecting

* fix test
2023-01-11 17:40:12 +08:00
Raja Subramanian
4ba7e57683 Make an IsDisconnected interface and use it (#1278) 2022-12-31 12:53:02 +05:30
David Zhao
112d6fc18b Reduced log verbosity for pieces that are stable (#1274) 2022-12-29 23:47:36 -08:00
Benjamin Pracht
86bf5cb62e Ensure we create en Egress ID with PsRPC (#1273) 2022-12-30 13:46:45 +13: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
David Colburn
5d3f644667 update psrpc (#1266) 2022-12-27 13:43:32 -08:00
David Zhao
988858a98a Update dependencies to generic versions (#1259) 2022-12-26 22:29:13 -08:00
David Colburn
976d4ea9db Update psrpc, egressStore interface (#1256)
* Update psrpc, egressStore interface

* psrpc v0.2.0
2022-12-24 00:49:31 -08:00
Raja Subramanian
1a48cc6a8b Track subscription operations per source track. (#1248) 2022-12-23 12:23:26 +05:30
David Colburn
6719a3c714 Updated egress rpc (#1252)
* updated egress rpc

* check if egress exists on stop

* fix static check

* remove old migration code

* rename

* regenerate, update test

* latest staticcheck

* update to psrpc 0.1.0

* fix tests

* dual write rpcs on running egress

* remove unused field

* fix race, change service for egress impl

* return nil if bus is nil

* id -> ids

* add affinityFunc to StartEgress
2022-12-22 21:03:27 -08:00
Raja Subramanian
50e39b9985 Check participant SID also while removing a participant. (#1237) 2022-12-19 22:53:11 +05:30
David Zhao
120335da00 Allow skipping of sending ParticipantJoined analytics event (#1236)
In certain scenarios such as migration, we do not want a duplicate event
to be sent when the participant is reconnecting. The Prometheus metric
should still be updated though.
2022-12-18 22:09:20 -08:00