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

Bandwidth limiting #187

Open
darkdarkdragon opened this issue May 27, 2020 · 0 comments
Open

Bandwidth limiting #187

darkdarkdragon opened this issue May 27, 2020 · 0 comments

Comments

@darkdarkdragon
Copy link
Contributor

What's the problem? (required)
We want to be able to limit bandwidth used by API users.

Proposed implementation
Mist allows to configure webhook that will be triggered when stream exceed some threshold -
we can use that to implement configurable system for limiting bandwidth.

Bandwidth could be constrained per stream and per user (say, we have constrain of 10Mb per stream and 50Mb per user - that means that user will not be able to simultaneously transcode more than 5 streams).
There will be global limit that can be overridden per user.

API changes:
add global object
/globalConfig

{
    bandwithLimit: {
        stream: number, // bytes per second
        user: number // bytes per second
    }
}

Also field bandwithLimit with the same structure could optionally be added to user object.
API endpoint /api/stream/key/:streamKey which is used by mist-api-connector to retrieve
stream's information will also return bandwithLimit inside stream object. First it will
look for bandwithLimit in the user's object, and if not set then will return bandwithLimit
from the globalConfig object. mist-api-connector will use that information to stop streams
that exceed specified threshold.

@adamsoffer adamsoffer transferred this issue from livepeer/livepeer-monorepo Jan 2, 2021
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

No branches or pull requests

1 participant