livepeer / livepeer/studio

implement caching of broadcaster list for manifest requests

Open
#195 0 comments 0 reactions 1 assignee View on GitHub

@ya7ya is already working on this.

Since Dec 16, 2019.

Dominant language
TypeScript
Stars
88
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Currently, requests for `https://livepeer.live/stream/UUID.m3u8` [hit every single broadcaster](https://github.com/livepeer/livepeerjs/blob/master/packages/api/src/worker.js#L122) to amalgamate manifests. This is inefficient and fragile; we might break if a single broadcaster request gets stuck.

What we should do instead is maintain a mapping of stream UUID to broadcasters and only amalgamate from broadcasters that have data for us. To accomplish this, we can create a new record for a broadcaster when we [get an incoming webhook request](https://github.com/livepeer/livepeerjs/blob/master/packages/api/src/controllers/stream.js#L60), and then only make upstream requests to the pertinent broadcaster.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.