Skip to content

Introduce configurable congestion control.#38

Merged
mtenpow merged 5 commits intomasterfrom
congestion-control
Mar 1, 2024
Merged

Introduce configurable congestion control.#38
mtenpow merged 5 commits intomasterfrom
congestion-control

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
@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