QuestDB JavaScript Client - v5.0.0
    Preparing search index...

    Interface QwpNodeEgressOptions

    Endpoint routing preferences. Named for egress, where they landed first, but ingress ranks and validates its endpoints with the same machinery and honours the same two keys.

    interface QwpNodeEgressOptions {
        agent?: Agent;
        authorization?: string;
        authTimeoutMs?: number;
        clientId?: string;
        closeTimeoutMs?: number;
        compression?: QwpEgressCompression;
        compressionLevel?: number;
        connectTimeoutMs?: number;
        failoverUrls?: readonly (string | URL)[];
        headers?: Record<string, string>;
        maxBatchRows?: number;
        maxVersion?: number;
        protocols?: string | string[];
        requestDurableAck?: boolean;
        sendTimeoutMs?: number;
        target?: QwpTarget;
        url: string | URL;
        webSocketFactory?: (
            url: string | URL,
            options: {
                agent?: Agent;
                headers: Record<string, string>;
                onConnected: () => void;
                onUpgrade: (headers: IncomingHttpHeaders) => void;
                onUpgradeRejected: (rejection: QwpNodeUpgradeRejection) => void;
                protocols?: string | string[];
            },
        ) => QwpWebSocketLike;
        zone?: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    agent?: Agent

    Optional HTTP(S) agent used for the WebSocket upgrade.

    authorization?: string
    authTimeoutMs?: number

    Time allowed after TCP/TLS connection for HTTP authentication and the WebSocket upgrade.

    Defaults to QwpWebSocketConnectOptions.connectTimeoutMs when that is set, and to 15s otherwise, so narrowing only the connect deadline bounds the whole opening rather than being exceeded by a default nobody chose. Set this to give the slower phase its own budget. Capped at 2,147,483,647ms (the host timer ceiling); a larger value throws a RangeError.

    clientId?: string
    closeTimeoutMs?: number

    Maximum time allowed for a graceful WebSocket close. Defaults to 15s. Capped at 2,147,483,647ms (the host timer ceiling); a larger value throws a RangeError.

    compression?: QwpEgressCompression

    Requests Zstd-compressed result batches. The default is raw, which preserves compatibility with servers that predate QWP compression. auto currently advertises the same ordered preference as zstd.

    compressionLevel?: number

    Zstd level hint sent to the server. Must be between 1 and 22, and only takes effect alongside compression; the default raw sends no accept-encoding header for a level to travel on.

    connectTimeoutMs?: number

    Node TCP/TLS connection deadline, or the complete opening deadline in a browser. Defaults to 15s. Capped at 2,147,483,647ms (the host timer ceiling); a larger value throws a RangeError.

    failoverUrls?: readonly (string | URL)[]

    Additional endpoints attempted in order when the preferred endpoint fails.

    headers?: Record<string, string>
    maxBatchRows?: number

    Requests a server-side RESULT_BATCH row cap.

    maxVersion?: number
    protocols?: string | string[]
    requestDurableAck?: boolean

    Ingress-only. Durable ACK is negotiated on /write/v4; egress ignores it and egressTransportOptions() strips it, because sending the header on /read/v1 makes every query session fail the capability check.

    sendTimeoutMs?: number

    Maximum time a send may remain queued by the WebSocket. Defaults to 15s. Capped at 2,147,483,647ms (the host timer ceiling); a larger value throws a RangeError.

    target?: QwpTarget

    Selects any readable node, a primary/standalone node, or a replica.

    url: string | URL
    webSocketFactory?: (
        url: string | URL,
        options: {
            agent?: Agent;
            headers: Record<string, string>;
            onConnected: () => void;
            onUpgrade: (headers: IncomingHttpHeaders) => void;
            onUpgradeRejected: (rejection: QwpNodeUpgradeRejection) => void;
            protocols?: string | string[];
        },
    ) => QwpWebSocketLike

    Test hook; defaults to the Node-only ws implementation.

    zone?: string

    Opaque, case-insensitive preferred zone; cross-zone fallback stays enabled.