-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set the keep alive timeout to 31 seconds (#1111)
* Set the keep alive timeout to 30.5 seconds * extend window to 31 seconds * Update .changeset/fair-shrimps-count.md Co-authored-by: Ryan Ling <ryan@outlook.com.au> * Update template/koa-rest-api/src/listen.ts Co-authored-by: Ryan Ling <ryan@outlook.com.au> * Update template/express-rest-api/src/listen.ts Co-authored-by: Ryan Ling <ryan@outlook.com.au> --------- Co-authored-by: Ryan Ling <ryan@outlook.com.au>
- Loading branch information
Showing
3 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
'skuba': patch | ||
--- | ||
|
||
template/\*-rest-api: Set `keepAliveTimeout` to 31 seconds to prevent HTTP 502s | ||
|
||
The default Node.js server keep-alive timeout is set to 5 seconds. However, the Gantry default ALB idle timeout is 30 seconds. This would lead to the occasional issues where the sidecar would throw `proxyStatus=502` errors. AWS recommends setting an application timeout larger than the ALB idle timeout. | ||
|
||
A more detailed explanation can be found in the below links: | ||
|
||
1. <https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html#connection-idle-timeout> | ||
2. <https://nodejs.org/docs/latest-v18.x/api/http.html#serverkeepalivetimeout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters