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

Introduce configurable congestion control. #38

Merged
merged 5 commits into from
Mar 1, 2024
Merged

Conversation

mtenpow
Copy link
Contributor

@mtenpow mtenpow commented Feb 29, 2024

The primary motivation for this (as of 2024/02/28) is increase availability for customers using PlayHT On-Prem appliance by adding quick retries in response to RESOURCE_EXHAUSTED errors.

This change allows customers to turn on one of an enumerated set of congestion control algorithms. We've implemented just one for now, STATIC_MAR_2024, which retries at most twice with a 50ms backoff between attempts. This is a dead simple congestion control algorithm with static constants; it leaves a lot to be desired. We should iterate on these algorithms in the future. The CongestionCtrl enum was added so that algorithms can be added without requiring customers to change their code much.

See the analogous change in the NodeJs SDK here: playht/playht-nodejs-sdk#31

    The primary motivation for this (as of 2024/02/28) is increase availability for customers using PlayHT On-Prem appliance by adding quick retries in response to RESOURCE_EXHAUSTED errors.

    This change allows customers to turn on one of an enumerated set of congestion control algorithms.  We've implemented just one for now, STATIC_MAR_2024, which retries at most twice with a 50ms backoff between attempts. This is a dead simple congestion control algorithm with static constants; it leaves a lot to be desired.  We should iterate on these algorithms in the future.  The CongestionCtrl enum was added so that algorithms can be added without requiring customers to change their code much.
@mtenpow mtenpow marked this pull request as ready for review February 29, 2024 21:28
@mtenpow mtenpow requested a review from NCarrollPlay February 29, 2024 21:28
@mtenpow mtenpow merged commit 480164e into master Mar 1, 2024
9 checks passed
@mtenpow mtenpow deleted the congestion-control branch March 1, 2024 00:25
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 this pull request may close these issues.

2 participants