diff --git a/.gitignore b/.gitignore index 0b8f1a405bda3a..69c1dd205316fa 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,7 @@ /tags /tags.* /doc/api.xml +/docs/ /node /node_g /gon-config.json diff --git a/doc/api/quic.md b/doc/api/quic.md index ecd0d73803888a..2d082425601596 100644 --- a/doc/api/quic.md +++ b/doc/api/quic.md @@ -2094,6 +2094,20 @@ added: v23.8.0 * Type: {bigint} +### `streamStats.bytesAccumulated` + + + +* Type: {bigint} + +The current number of bytes sitting in the stream's receive accumulation +buffer, awaiting delivery to the application. A value near zero indicates +the reader is keeping up with incoming data. A value near the stream's +flow control window indicates the application is not consuming data fast +enough. + ### `streamStats.bytesReceived` + +* Type: {bigint} + +The peak number of bytes that were accumulated in the stream's receive +buffer at any point during the stream's lifetime. This value only +increases monotonically. It is useful for diagnosing whether a stream +experienced backpressure episodes and whether the accumulation buffer +sizing is appropriate for the workload. + ### `streamStats.maxOffset` + +* Type: {boolean} +* Default: `false` + +When `true`, allows multiple endpoints (across separate processes) to bind to +the same address and port. The kernel will load-balance incoming UDP datagrams +across all sockets bound with this option. This enables horizontal scaling of +QUIC servers by running multiple Node.js processes on the same port. + +Supported on Linux 3.9+ and DragonFlyBSD 3.6+. On unsupported platforms, the +bind will fail with an error. + #### `endpointOptions.maxConnectionsPerHost` + +* Type: {bigint|number} +* **Default:** `0` (use ngtcp2 default of 333ms) + +Specifies the initial round-trip time estimate in milliseconds. This value is +used for probe timeout (PTO) computation, initial pacing, and early loss +detection before the first actual RTT sample is collected from the connection. +The default of 333ms is appropriate for the general internet. For low-latency +environments such as loopback or same-rack deployments, setting a value closer +to the actual RTT (e.g., `1`) avoids unnecessarily conservative initial +behavior. + #### `sessionOptions.keepAlive`