Commit Graph

1436 Commits

Author SHA1 Message Date
cnderrauber 2c9d7fbbcb WIP 2022-12-28 15:38:08 +08:00
cnderrauber 06975d901a WIP 2022-12-22 15:36:12 +08:00
David Colburn eea592a1f5 Upgrade go to 1.18 (#1249)
* upgrade go to 1.18

* update buildtest
2022-12-21 16:41:47 -08:00
Raja Subramanian d05d26cc04 Do not patch subscription setting when processing UpdateSubscription (#1247)
message.

There are is a sequence where a dupe could be detected due to patching
which could lead to issues.

The sequence is
- UpdataTrackSettings with some values
- UpdateSubscription with Subcribe: false - this will patch from above
  track settings
- UpdateSubscription with Subscribe: true - this will continue patching
- UpdateTrackSettings with the same settings as in the first step - this
  will be declared a dupe because the track is enabled and the patched
  settings will declare no change in settings.

This is okay in the current code as subscription settings are cached at
participant level and applied when somebody re-subscribes. But, that
down stream processing can change any time.

So, when processing `UpdateSubscription` message, just do not patch.
If a later `UpdateTrackSettings` comes along, let it pass even if it
is not changing anything.
2022-12-21 11:12:40 +05:30
Raja Subramanian f24c1b95c2 Initial commit of signal deduper. (#1243)
* Initial commit of signal deduper.

Idea is protect against signal storm from misbehaving clients.

Design:
- SignalDeduper interface with one method to handle a SignalRequest and
  return if dupe or not.
- Signal specific deduper. Could have made a single de-duper which could
  handle all signal message types, but making it per type so that the
  code is cleaner.
- Some module (like the router) can instantiate whatever signal types
  it wants to de-dupe. When a signal message is received, that module
  can run the signal message through the list of de-dupers and
  potentially drop the message if any of the de-dupers declare that the
  message is a dupe. Making it a list makes things a little bit
  inefficient, but keeps things cleaner. Hopefully, not many de-dupers
  will be needed so that the inefficiency is not pronounced.

* re-arrange comments

* helper function

* add ParticipantClosed
2022-12-21 09:29:56 +05:30
David Zhao c1d7dbd4fc Tweaks to prometheus participant counter (#1240)
* Tweaks to prometheus participant counter

Ensure that we don't miss adding a count in migration scenarios

* avoid nil ICEConfig
2022-12-19 14:30:14 -08:00
Raja Subramanian 50e39b9985 Check participant SID also while removing a participant. (#1237) 2022-12-19 22:53:11 +05:30
Raja Subramanian e6bbf07089 Comment out memstats worker. (#1239) 2022-12-19 22:37:34 +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
Raja Subramanian 241a7120f5 ICE config using protocol model (#1233)
* ICE config using protocol model

* use pointers consistently

* protocol pointer

* mage generate
2022-12-19 10:25:08 +05:30
David Zhao 33902a9f2a Do not send ParticipantLeft webhook event unless connected successfully. (#1234)
Fixes #1130
2022-12-18 17:37:55 -08:00
David Zhao dc3f566f1a version 1.3.2 (#1231) v1.3.2 2022-12-16 00:01:58 -08:00
Haibo Chen 8a6c6de1db update name of participant (#1213) 2022-12-15 22:03:59 -08:00
Raja Subramanian c9cc45c8b0 Move log to debug as warn does not show anything bad (#1230) 2022-12-16 10:32:50 +05:30
renovate[bot] 2f64d9f1c5 Update module github.com/pion/webrtc/v3 to v3.1.50 (#1225)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-15 17:47:29 -08:00
renovate[bot] 7d1cf8a6b4 Update goreleaser/goreleaser-action action to v4 (#1227)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-15 17:43:23 -08:00
Raja Subramanian dfc0411908 Reverting some dynacast logs to Debugw (#1229) 2022-12-15 12:32:07 +05:30
cnderrauber 090c35ddfd change no response sink to info and not return (#1228) 2022-12-14 11:22:23 +08:00
cnderrauber da829fcf8e diable prflx over relay for firefox (#1226)
* Disable prflx over relay for firefox

* remove ice lite change

* solve comment

* disable prflx for publisher too
2022-12-13 14:32:05 +08:00
Raja Subramanian 80a4dc574a Fallback to participant key if base62 is not available (#1223) 2022-12-13 05:01:23 +05:30
David Zhao 5af442ac10 Enable item sampler for Room logger (#1222) 2022-12-10 20:07:16 -08:00
renovate[bot] 01ef69cb14 Update module github.com/urfave/cli/v2 to v2.23.7 (#1221)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-10 16:05:58 -08:00
Raja Subramanian b2df257ac6 base62 encode user provided name/identity. (#1220) 2022-12-10 13:02:31 +05:30
David Zhao 7a1273151f Update to new logging library, using sampling participant logger (#1219) 2022-12-09 00:09:03 -08:00
Benjamin Pracht 57ce032cfe Add support for Ingress State Ended At field (#1218) 2022-12-08 11:14:32 -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
cnderrauber eb134dc535 Close migration muted track which is not fired (#1215) 2022-12-07 13:53:37 +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
cnderrauber 6f27d683a9 Don't output error log if upstream closed while binding (#1211) 2022-12-05 15:32:30 +08:00
David Zhao e9abb47020 Added logging fields for Ingress & Egress services (#1205) 2022-12-04 21:44:16 -08:00
renovate[bot] 7548ffbb82 Update module github.com/pion/transport to v0.14.1 (#1202)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-04 16:45:22 -08:00
renovate[bot] b9412cea10 Update module github.com/pion/turn/v2 to v2.0.9 (#1201)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-04 16:36:44 -08:00
renovate[bot] 08e7fd6c03 Update module github.com/urfave/cli/v2 to v2.23.6 (#1207)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-04 16:24:00 -08:00
David Zhao 14de2bec9c Fixed single-node routing breakage. (#1209)
* Fixed single-node routing breakage.

Due to a regression of a previous change, Redis was always enabled even
when no configuration was provided.

* updated go modules
2022-12-04 16:23:35 -08:00
Raja Subramanian 2cad63fe9a Create response channel before sending StartSession (#1208) 2022-12-05 00:11:52 +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
David Zhao d146ec7a1f Improve logging messages with RoomService (#1203) 2022-11-30 22:17:28 -08:00
David Zhao c6eb834e17 Revert "Update module go.uber.org/zap to v1.24.0 (#1200)"
This reverts commit bf0bbc3d41.
2022-11-30 21:51:26 -08:00
renovate[bot] f0165adfc4 Update module github.com/twitchtv/twirp to v8.1.3+incompatible (#1120)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-30 18:12:05 -08:00
renovate[bot] 2175eac2bd Update module github.com/hashicorp/golang-lru to v0.6.0 (#1165)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-30 18:11:33 -08:00
renovate[bot] bf0bbc3d41 Update module go.uber.org/zap to v1.24.0 (#1200)
Generated by renovateBot

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-30 17:29:51 -08:00
David Zhao 1ac6311849 Suppress a few additional Pion logs (#1199)
* Suppress a few additional Pion logs

* remove dupe
2022-11-30 13:32:46 -08:00
cnderrauber 3c907ed460 Add stats for data channel and signal (#1198)
* Add stats for data channel and signal

* Solve comment
2022-11-30 14:53:19 +08:00
Mathew Kamkar caae389717 node type prometheus metric labels (#1197) 2022-11-29 20:36:35 -08:00
cnderrauber 711799ecf8 Encoding primary packet only if red encoding don't have enough space (#1196)
* Encoding primary packet only if red encoding don't have enough space

* clean code
2022-11-28 13:58:01 +08:00
cnderrauber aaeb3c933c Fix rtcp lost for downtrack used incorrect buffer factory (#1195)
* Fix rtcp lost for downtrack used incorrect buffer factory

In buffer factory change(#1173), every pariticipant has its own
buffer factory, can't use publisher's bufferfactory to create
DownTrack

* clean code
2022-11-28 13:04:56 +08:00
Raja Subramanian 086009f05a Do not forward media till peer connection is connected. (#1194)
There were some failures with missing media. The only thing I could
see between working and non-working case is when media forwarding
starts. So, delay media forwarding till peer connection is connected.

Also, add a subscribe op only if a subscribe/unsubscribe queuing is
successful. There was a recent change to not queue a subscribe when
the participant is closed/disconnected. This got the subscribe op
counter out of whack.
2022-11-26 21:42:19 +05:30
Raja Subramanian 55718724a9 Check forwarder started when seeing. (#1191)
When switching from local -> remote or remote -> local,
the forwarder state is cached and restored after the switch
to ensure continuity in sequence number /time stamp.
But, if the forwarder had not started before the switch,
the sequence number always starts at 1 because of seeding.
So, do not see unless forwarder was started before the switch.
2022-11-26 01:05:29 +05:30
Raja Subramanian 0256e071ad Promote dyancast logs for debugging (#1190) 2022-11-25 10:16:30 +05:30
cnderrauber c28b07fd11 set stereo max bitrates to 510000 (#1188) 2022-11-24 22:51:15 +08:00