feat(http): support server-level timeout and socket options via app-config
Adds support for configuring server-level HTTP options through the `app-config.yaml` file under the `backend.server` key. This includes support for: `headersTimeout`, `keepAliveTimeout`, `requestTimeout`, `timeout`, `maxHeadersCount`, and `maxRequestsPerSocket`. These options are passed directly to the underlying Node.js HTTP server, when omitted, the default values are used. Refs: https://github.com/backstage/backstage/issues/21808 Refs: https://github.com/backstage/backstage/issues/30449 Signed-off-by: Beth Griggs <bethanyngriggs@gmail.com>
This commit is contained in:
@@ -65,6 +65,14 @@ backend:
|
||||
# - A standard ISO formatted duration string, e.g. 'P2DT6H' or 'PT1M'.
|
||||
# - An object with individual units (in plural) as keys, e.g. `{ days: 2, hours: 6 }`.
|
||||
serverShutdownDelay: { seconds: 20 }
|
||||
server:
|
||||
# (Optional) HTTP server configuration, Node.js defaults apply otherwise
|
||||
headersTimeout: 60000
|
||||
keepAliveTimeout: 5000
|
||||
maxHeadersCount: 2000
|
||||
maxRequestsPerSocket: 100
|
||||
requestTimeout: 30000
|
||||
timeout: 30000
|
||||
```
|
||||
|
||||
### Via Code
|
||||
|
||||
Reference in New Issue
Block a user