Skip to content

ABSOLUTE_MAX_PAYLOAD_SIZE

const ABSOLUTE_MAX_PAYLOAD_SIZE: number

Defined in: protocol/src/wire-format.ts:45

Absolute maximum payload size - a deliberate, conservative interop cap.

The wire format itself allows up to ~4GiB (the length field is a uint32), and on Node >= 22 (the supported floor) Buffer’s MAX_LENGTH is far above 2GB - so this is NOT a runtime limitation. Capping at 2GB-1 keeps payload sizes within a signed 32-bit range for interop with other runtimes and implementations. Cannot be exceeded regardless of configuration.