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

FRIDGE-1084 Change default concurrency limit #517

Merged
merged 3 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/sour-goats-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@twilio-labs/plugin-serverless': patch
'@twilio-labs/serverless-api': patch
---

Change default concurrency limit from 50 to 10
4 changes: 2 additions & 2 deletions packages/plugin-serverless/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ USAGE
### Concurrency

When deploying lots of Functions and Assets it is possible to run up against the enforced concurrency limits of the Twilio API. You can limit the concurrency and set how many times the library retries API requests using environment variables.

The default concurrency is 50 and the default number of retries is 10. You can change this by setting environment variables. The following would set concurrency to 1, only 1 live request at a time, and retries to 0, so if it fails it won't retry.
It is advisable to keep the concurrency low (around 10-15) to avoid hitting the rate limits of the Twilio API.
The default concurrency is 10 and the default number of retries is 10. You can change this by setting environment variables. The following would set concurrency to 1, only 1 live request at a time, and retries to 0, so if it fails it won't retry.

```sh-session
export TWILIO_SERVERLESS_API_CONCURRENCY=1
Expand Down
2 changes: 1 addition & 1 deletion packages/serverless-api/src/api/utils/http_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if (typeof retryLimit === 'undefined') {

let concurrency = process.env.TWILIO_SERVERLESS_API_CONCURRENCY;
if (typeof concurrency === 'undefined') {
concurrency = '50';
concurrency = '10';
}

export const RETRY_LIMIT = parseInt(retryLimit, 10);
Expand Down
Loading