Skip to content

Home / node / BaseClient / interfaces / AdvancedBaseClientConfiguration @valkey/valkey-glide


@valkey/valkey-glide / BaseClient / AdvancedBaseClientConfiguration

Interface: AdvancedBaseClientConfiguration

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

Remarks

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

Connection Timeout

  • Connection Timeout: The connectionTimeout property specifies the duration (in milliseconds) the client should wait for a connection to be established.

TLS config

  • TLS Configuration: The tlsAdvancedConfiguration property allows for advanced TLS settings, such as enabling insecure mode.

Example

const config: AdvancedBaseClientConfiguration = {
  connectionTimeout: 5000, // 5 seconds
};

Properties

connectionTimeout?

optional 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.


tlsAdvancedConfiguration?

optional tlsAdvancedConfiguration: object

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

insecure?

optional insecure: 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).