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

Add connect and read timeout configuration to the fetch request used in a Lambda function #2938

Open
robotdan opened this issue Dec 4, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@robotdan
Copy link
Member

robotdan commented Dec 4, 2024

Add connect and read timeout configuration to the fetch request used in a Lambda function

Description

When using Lambda HTTP Connect we do not currently expose the read and connect timeouts. It is possible then to receive a connect timeout or a read timeout.

While in general, it is risky to make an HTTP request during a lambda function that is slow and may not be responsive - there are use cases where it may be tolerable or expected and increasing these timeouts may be valuable.

Solution

Allow connect and read timeout to be configured.

Example:

var response = fetch("https://acme.com/api/doWork", {
                                  method: "GET",
                                  connectTimeout: 42000,   // 42,000 ms, or 42 seconds
                                  readTimeout: 42000       // 42,000 ms, or 42 seconds
                                });

The default value for connectTimeout and readTimeout is 2000 ms or 2 seconds.

Related

Community guidelines

All issues filed in this repository must abide by the FusionAuth community guidelines.

@robotdan
Copy link
Member Author

robotdan commented Dec 4, 2024

@robotdan robotdan self-assigned this Dec 4, 2024
@robotdan robotdan added the enhancement New feature or request label Dec 4, 2024
@robotdan robotdan added this to the 1.55.0 milestone Dec 4, 2024
@robotdan robotdan moved this to Code complete in FusionAuth Issues Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Code complete
Development

No branches or pull requests

1 participant