livepeer / livepeer/studio

automatically create IngressRoutes for routing incoming playback requests

Open
#122 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

**What's the problem? (required)**
We need to figure out how to route incoming playback requests to horizontally-scaled ingest servers. Two use cases in mind here:

1. Routing incoming playback requests to Mist servers that automatically route to an origin
2. Routing "custom names" to go-livepeer/Mist, allowing for "vanity names" like `/stream/eli.m3u8`

Here's what I'm thinking so far.
* The API server gains the capability to automatically create Traefik `IngressRoute` resources that route e.g. `/stream/eli*` to the `prod-livepeer-{shard}` service or `/hls/{playbackId}` to the `mist-server-0` service.
* The first place this will happen is on mist-api-connector's `/stream/:id/setactive` endpoint. When a new Mist stream comes in, we will create a new route for `/hls/{playbackId}` to the appropriate Mist server. `mist-api-connector` will be provided with the pertinent service name that it can then pass to the API.
* Later on this can also happen in the `/api/stream/hook` endpoint so streams with "vanity names" can be implemented with go-livepeer.

Alternatives:
This creates a dependency on the availability of the local Kubernetes API for ingesting new streams. We could instead keep the `name --> service` mapping in our own API database and proxy the streams through the API. This would require us to write some manner of API-aware proxy and send all traffic through it. I like using Traefik instead, but it's important to keep the tradeoff in mind.

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.

Research direction

Start with mist-api-connector's /stream/:id/setactive endpoint and the API server's handling of Kubernetes resources. Trace how a new Mist stream identifies its target service and review the proposed IngressRoute paths for /hls/{playbackId} and future vanity names. Done means the routing design and its Kubernetes dependency are resolved for the stated use cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, typescript
Domain
backend-api-design, devops, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.