@valkey/valkey-glide
    Preparing search index...

    Interface AdvancedBaseClientConfiguration

    Represents advanced configuration settings for a client, including connection-related options.

    The AdvancedBaseClientConfiguration interface defines advanced configuration settings for managing the client's connection behavior.

    • Connection Timeout: The connectionTimeout property specifies the duration (in milliseconds) the client should wait for a connection to be established.
    • TLS Configuration: The tlsAdvancedConfiguration property allows for advanced TLS settings, such as enabling insecure mode.
    const config: AdvancedBaseClientConfiguration = {
    connectionTimeout: 5000, // 5 seconds
    };
    interface AdvancedBaseClientConfiguration {
        connectionTimeout?: number;
        pubsubReconciliationIntervalMs?: number;
        tcpNoDelay?: boolean;
        tlsAdvancedConfiguration?: {
            insecure?: boolean;
            rootCertificates?: string | Buffer;
        };
    }
    Index

    Properties

    connectionTimeout?: number

    The duration in milliseconds to wait for a TCP/TLS connection to complete. This applies both during initial client creation and any reconnection that may occur during request processing. Note: A high connection timeout may lead to prolonged blocking of the entire command pipeline. If not explicitly set, a default value of 2000 milliseconds will be used.

    pubsubReconciliationIntervalMs?: number

    The interval in milliseconds between PubSub subscription reconciliation attempts.

    The reconciliation process ensures that the client's desired subscriptions match the actual subscriptions on the server. This is useful when subscriptions may have been lost due to network issues or server restarts.

    If not explicitly set, the Rust core will use its default reconciliation interval.

    • Must be a positive integer representing milliseconds.
    • The reconciliation process runs automatically in the background.
    • A lower interval provides faster recovery from subscription issues but increases overhead.
    • A higher interval reduces overhead but may delay recovery from subscription issues.
    const config: GlideClientConfiguration = {
    addresses: [{ host: "localhost", port: 6379 }],
    advancedConfiguration: {
    pubsubReconciliationIntervalMs: 5000 // Reconcile every 5 seconds
    }
    };
    tcpNoDelay?: boolean

    Controls TCP_NODELAY socket option (Nagle's algorithm).

    • When true, disables Nagle's algorithm for lower latency by sending packets immediately without buffering. This is optimal for Redis/Valkey workloads with many small requests.

    • When false, enables Nagle's algorithm to reduce network overhead by buffering small packets. This may increase latency by up to 200ms but reduces the number of packets sent.

    • If not explicitly set, a default value of true will be used by the Rust core.

    tlsAdvancedConfiguration?: {
        insecure?: boolean;
        rootCertificates?: string | Buffer;
    }

    The advanced TLS configuration settings. This allows for more granular control of TLS behavior, such as enabling an insecure mode that bypasses certificate validation.

    Type Declaration

    • Optionalinsecure?: boolean

      Whether to bypass TLS certificate verification.

      • When set to true, the client skips certificate validation. This is useful when connecting to servers or clusters using self-signed certificates, or when DNS entries (e.g., CNAMEs) don't match certificate hostnames.

      • This setting is typically used in development or testing environments. It is strongly discouraged in production, as it introduces security risks such as man-in-the-middle attacks.

      • Only valid if TLS is already enabled in the base client configuration. Enabling it without TLS will result in a ConfigurationError.

      • Default: false (verification is enforced).

    • OptionalrootCertificates?: string | Buffer

      Custom root certificate data for TLS connections.

      • When provided, these certificates will be used instead of the system's default trust store. If not provided, the system's default certificate trust store will be used.

      • The certificate data should be in PEM format as a string or Buffer.

      • This is useful when connecting to servers with self-signed certificates or custom certificate authorities.