Commit Graph
641 Commits
Author SHA1 Message Date
David ZhaoandGitHub 91cb4369ef Standardize twirp hooks during server init (#2959) 2024-08-26 00:53:13 -07:00
David ColburnandGitHub 0fdfe2f5a0 refactor sip create participant (#2949) 2024-08-21 17:13:26 -04:00
Denys SmirnovandGitHub 7ad6d97b1b Propagate SIP attributes from a Dispatch Rule. (#2943) 2024-08-19 18:09:37 +03:00
Paul WellsandGitHub dabbb298c5 mark explicit create paths (#2935) 2024-08-13 22:00:39 -07:00
Paul WellsandGitHub c371929535 add roommanager service (#2931)
* add roommanager service

* cleanup

* deps

* timeout

* cleanup

* cleanup

* config

* cleanup
2024-08-13 11:00:41 -07:00
Benjamin PrachtandGitHub 64057c3e4d Implement AgentDispatch service (#2919)
This allows listing, adding and deleting agent dispatches on an existing room. Requests go to a new AgentDispatchService, which sends them over RPC to the rtc.Room via the RoomManager. The rtc.Room then does agent job management using RPCs to the agent service.
2024-08-08 22:31:23 +02:00
Dan McFaulandGitHub 489f73f0a4 distribute load to agents probabilistically, inversely proportionate to load (#2902)
* select the least loaded agent worker for job dispatch

* update to load balance using inverse load

* remove unused file

* adding unit tests for worker job distribution
2024-08-07 21:05:47 -06:00
Paul WellsandGitHub e9b6bf43c3 add mock agent for integration tests (#2913)
* add mock agent for integration tests

* cleanup
2024-08-06 19:46:52 -07:00
Paul WellsandGitHub de0c5bbd91 use structured logging for create room request (#2912) 2024-08-06 19:45:00 -07:00
Benjamin PrachtandGitHub 0fd09d73c1 Instantiate default agent dispatches in rtc for better backward compatibility (#2886) 2024-07-22 08:44:13 -07:00
Benjamin PrachtandGitHub a877ba2352 Partial support for agent dispatch management (#2872)
- Store agent dispaches independently of room agents on rtc.Room
- Serialize agent dispatches in rtc.Room
- Support for agent dispatch and job serialization in redis

The agent Job object references denormalized Room and ParticipantInfo object. When storing Jobs, this sets the Room to nil, and only stores the Participant identity field. When read back, these fields need to be set to their current value.
2024-07-18 13:36:43 -07:00
cnderrauberandGitHub 5e1b18dab3 Add option to disable ice lite (#2862)
Some sfu's ice agent implementation has problem
to establish ice connection with lite ice agent,
add option to let client to disble it in server side.
2024-07-15 15:11:46 +08:00
Raja SubramanianandGitHub 09e3aef859 Check size limits on metadata and name set from client. (#2850)
* Send error response when update metadata fails.

Keeping it simple for the first implementation.
- Send error response only if request_id != 0
- Two kinds of errors notified
  o does not have permissions - NOT_ALLOWED
  o attributes exceeds size limits -  INVALID_ARGUMENT

* Check size limits on metadata and name set from client.

Added a name length limit also.

* check name length in service update participant path also

* limit check in limit config

* update protocol

* longer keys
2024-07-12 09:57:17 +05:30
Benjamin PrachtandGitHub 6c1d5e8699 Do not create room in UpdateRoomMetadata (#2854) 2024-07-11 17:50:30 -07:00
Benjamin PrachtandGitHub a1f8e879cd Allow specifying room configuration in token (#2853) 2024-07-10 20:48:19 -07:00
Benjamin PrachtandGitHub fb7eb3450e Update agents service to updated protocol (#2837)
- Deprecate namespace field
- Restore former semantic of starting a job for each registered namespace, for a given Agent Name
- Add agentName field
- Use "dispatcher" naming convention
2024-07-08 17:09:11 -07:00
Paul WellsandGitHub e511464d3d add handler interface to receive agent worker updates (#2830)
* add handler interface to receive agent worker updates

* cleanup
2024-07-02 13:11:08 -07:00
Benjamin PrachtandGitHub 32a4d03c9e Implement Agents protocol addition (#2786) 2024-06-27 19:20:52 -07:00
holzgeistandGitHub 6523c9c099 Feat add prometheus auth (#2252)
* feat: add support for basic auth on prometheus

* fix: properly name middleware generator

* refactor: move all prometheus configs into common object

* chore: add suggestions from review

add back old config switch and print warning if it is used

* fix: undo accidental change

* fix: rebase/merge issue
2024-06-27 02:13:51 -07:00
Denys SmirnovandGitHub 4388618e9a Update protocol. Use SIP grants. (#2808) 2024-06-23 21:54:28 +03:00
David ZhaoandGitHub 7a774cc82a Support for participant attributes (#2806)
* Support for participant attributes

* move metadata setters to LocalParticipant

* address feedback

* forward error

* update go mod

* update attributes first
2024-06-19 23:14:19 -07:00
Denys SmirnovandGitHub 74c7b93170 Support new SIP Trunk API. Improve Redis tests. (#2799) 2024-06-17 21:49:51 +03:00
Paul WellsandGitHub 2bc101d323 use request context for LaunchJob api request (#2796)
* use request context for LaunchJob api request

* one more
2024-06-16 21:16:29 -07:00
Théo MonnomandGitHub 5def48bad9 fix agent jobs not launching when using the CreateRoom API (#2784) 2024-06-13 00:00:02 +02:00
David ColburnandGitHub 29614cd4a1 clean up egress launcher (#2779) 2024-06-10 16:11:11 -07:00
Paul WellsandGitHub f1886ece42 update protocol (#2760)
* update protocol

* deps
2024-06-05 19:46:34 -07:00
Paul WellsandGitHub bc6dbd98c7 fix sip MatchTrunk call (#2740) 2024-05-28 19:04:06 -07:00
Denys SmirnovandGitHub fa65712a0e Use camel case in SIP logs. (#2738) 2024-05-28 13:43:22 +03:00
cnderrauberandGitHub e6aa36fdd6 Add forward stats (#2725)
* Add forward metrics

* ignore packets was not forwarded

* rename
2024-05-24 17:43:28 +08:00
Denys SmirnovandGitHub a444f2477c Update protocol. Support SIP transports. (#2724) 2024-05-23 20:31:01 +03:00
Théo MonnomandGitHub 9887d32bd2 fix: connection reset without any closing handshake on clientside (#2709) 2024-05-11 13:39:17 +02:00
Benjamin PrachtandGitHub eef3cf0f01 Redact egress object in CreateRoom request (#2710) 2024-05-10 10:05:53 -07:00
Paul WellsandGitHub b54acb0bad ensure room is running before attempting to delete (#2705)
* ignore api errors when deleting room

* start room before deletion

* delete from db first

* load
2024-05-09 00:06:41 -07:00
Paul WellsandGitHub 9a5db132eb add room/participant name limit (#2704)
* add room/participant name limit

* defaults

* simplify

* omitempty

* handle 0 config

* fix race

* unlock

* tidy
2024-05-06 17:25:18 -07:00
Benjamin PrachtandGitHub f088730007 Add support for EnableTranscoding ingress option (#2681)
This changes the default WHIP ingress behavior to skipping transcode. Other inputs are still always transcoded.
2024-04-26 14:26:00 +02:00
Denys SmirnovandGitHub 07791ffc00 Pass new SIP metadata. Update protocol. (#2683) 2024-04-26 13:57:39 +03:00
Paul WellsandGitHub c51b3e3fe2 use ttlcache (#2677)
* use ttlcache

* go

* test
2024-04-23 02:20:54 -07:00
Raja SubramanianandGitHub 8f05385126 TTL param for ICE config cache (#2676)
* TTL param for ICE config cache

* rename to min
2024-04-23 10:49:55 +05:30
David ColburnandGitHub 8f8825cb88 fix participant, ensure room name matches (#2660) 2024-04-17 13:12:57 -07:00
Benjamin PrachtandGitHub 6afa63ded3 Use the ingress state updated_at field to ensure that out of order RPC do not overwrite state (#2657) 2024-04-16 18:10:14 +02:00
Raja SubramanianandGitHub 1ab0879d28 ICE config cache module. (#2654)
* ICE config cache module.

* generic key type

* no ICEConfig in StartSession

* clean up
2024-04-16 15:49:45 +05:30
Paul WellsandGitHub 7d5c991d8d add disconnected chan to participant (#2650) 2024-04-14 12:49:13 -07:00
David ColburnandGitHub 407614b28e fix jobRequestAffinity (#2641) 2024-04-10 12:44:46 -07:00
Raja SubramanianandGitHub c6ee34d083 Cleaning up stream allocator data. (#2639)
* Cleaning up stream allocator data.

Marking it with STREAM-ALLOCATOR-DATA for easier use later if needed.

* clean up a bit more

* wire_gen

* wire_gen
2024-04-10 13:31:25 +05:30
Mathew KamkarandGitHub 10c8582a6b get cpu stats from cgroup, remove env (#2636)
* get cpu stats from cgroup, remove env

* undo rand seed removal

* tests
2024-04-08 21:15:17 -07:00
David ZhaoandGitHub f4314686d1 Improve Agent logging (#2628) 2024-04-05 20:32:29 -07:00
David ColburnandGitHub fff937a89c participant kinds (#2626) 2024-04-05 12:59:06 -07:00
dc67f505a5 agent service: new protocol & namespaces (#2545)
* initial worker impl

* fix test

* fix build

* TestAgentNamespaces

* log err

* nit cmt

* TestAgentMultiNode

* Update pkg/agent/worker.go

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

* retry on worker selection & fix review comments

* Update roommanager.go

* license

* use testutils.WIthTimeout

* abstract namespace/enabled logic into agent.Client, incrementally dispatch

* typos and dates

* lock

* timeout is now optional

* pass in topics instead of fixed

* handler handles connections

* onIdle, numConnections

* fix WithGrants

* update protocol

* check agent client

* broadcast after unlock

* fix data race

* remove ReadChan, fix dispatcher

---------

Co-authored-by: David Zhao <dz@livekit.io>
Co-authored-by: David Colburn <xero73@gmail.com>
2024-04-03 15:25:42 -07:00
Denys SmirnovandGitHub 19326a7162 Pass ringtone flag for SIP outbound. (#2613) 2024-04-01 19:20:51 +03:00
Paul WellsandGitHub f1c991c547 skip logging retry message when ws disconnections before signal finishes (#2604) 2024-03-29 06:30:12 -07:00