Skip to content
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

B <> O upload timeouts #1656

Closed
yondonfu opened this issue Nov 9, 2020 · 0 comments · Fixed by #2122
Closed

B <> O upload timeouts #1656

yondonfu opened this issue Nov 9, 2020 · 0 comments · Fixed by #2122
Assignees

Comments

@yondonfu
Copy link
Member

yondonfu commented Nov 9, 2020

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

At the moment, we use a single HTTP timeout for B <> O segment submission. The timer for this timeout starts when B submits a request to /segment and ends when B finishes reading the response body returned by O.

This timeout covers:

  • Segment upload time to O
  • Transcode time on O
  • Response time on O [1]

[1] Note rendition download time is not included here since the response from O to segment submission includes the URLs for the renditions which are downloaded separately.

If there are networking/bandwidth issues with O causing slow uploads, B could end up waiting the full HTTP timeout (defaults to 4x the segment duration) before it fails over to a different O. There is an opportunity to detect the networking/bandwidth issue with O earlier if B defined more granular timeouts in addition to the HTTP timeout for segment submission.

Describe the solution you'd like
A clear and concise description of what you want to happen.

B can define an upload timeout which is strictly shorter than the segment submission HTTP timeout. The upload starts when B submits a request to /segment and ends when B receives a response status from O [2]. If this upload exceeds the defined timeout, then B can fail over to a different O instead of waiting the full segment submission HTTP timeout. The upload timeout might be defined as segment duration * uploadTimeoutMultiplier where uploadTimeoutMultiplier could default to something like 0.5 such that a 2 second segment has a 1 second upload timeout.

Code sketch

[2] The transcoding protocol has O send back a response status to acknowledge that the upload completed before it starts sending back data in the response body which only begins when it completes transcoding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants