-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-use remote transcoders for a stream #1842
Comments
* Adds better error handling
* Test cases * Session close fixes * Changed RTmutex pointer to var
Issue Status: 1. Open 2. Started 3. Submitted 4. Done This issue now has a funding of 0.35 ETH (921.26 USD @ $2632.18/ETH) attached to it.
|
Issue Status: 1. Open 2. Started 3. Submitted 4. Done Work has been started. These users each claimed they can complete the work by 265 years, 6 months from now. 1) reubenr0d has been approved to start work. Work for this almost complete, just left with some minor changes. Learn more on the Gitcoin Issue Details page. |
Issue Status: 1. Open 2. Started 3. Submitted 4. Done Work for 0.35 ETH (1182.52 USD @ $3378.63/ETH) has been submitted by:
|
Abstract
The split orchestrator and transcoder architecture enables the creation of transcoding pools. These pools can either be private or public.
When an orchestrator receives a stream it will currently send each segment for a
sessionID
to a different transcoder.Analogous to how a broadcaster sticks with the same orchestrator for all segments of a stream as long as it can transcode in real-time, an orchestrator should stick with the same transcoder for a stream.
Motivation
Sending each segment of a stream to a different transcoder could lead to a degradation of performance:
Proposed Solution
Current Flow
Segment comes in
The list of connected
RemoteTranscoders
is sorted byload
Each segment in flight for a
RemoteTranscoder
incrementsload
by 1Select the head of the sorted
RemoteTranscoder
listIf the
RemoteTranscoder
is no longer connected, discard it and continueSend segment to
RemoteTranscoder
Decrement
load
forRemoteTranscoder
upon returnSince ordering of the
RemoteTranscoder
list is not guaranteed at any point in time selection is entirely random.Proposed Flow
New segment comes in for stream with
sessionID
Check if there is a
RemoteTranscoder
assigned tosessionID
The list of connected
RemoteTranscoders
is sorted byload
, select the head of the list and increment itsload
.load
andcapacity
will be defined on a per-stream basis rather than a per-segment basis. Each stream session for aRemoteTranscoder
incrementsload
by 1Check whether the (newly) assigned
RemoteTranscoder
is still connectedIf the
RemoteTranscoder
is no longer connected, remove it from the list, remove it from the assignment and decrement itsload
Update
RemoteTranscoderManager
state to reflect the assignedRemoteTranscoder
forsessionID
(if necessary)Send segment to
RemoteTranscoder
load
Implementation Tasks and Considerations
One potential way of implementing this could be as follows:
Add a map to the
RemoteTranscoderManager
to keep track of the assignedRemoteTranscoder
for ansessionID
.RemoteTranscoderManager.selectTranscoder()
can be updated to take a sessionID as argument.RemoteTranscoder.completeTranscoder()
would also have to takesessionID
as an argument and be tied to the transcode session cleanup loop, or a separate cleanup loop.Testing Tasks and Considerations
sessionID
as long as no error or timeout occurs.The text was updated successfully, but these errors were encountered: