Skip to content

Connection Options

Valkey GLIDE maintains consistent and intuitive configuration across all supported languages. This guides will go over how connection configurations are handled across clients and listing the available options.

GLIDE clients uses configuration objects to configure connections to Valkey. This keeps a consistent interface between clients while staying within the idiomatic norms of each specific programming language.

The following are the configuration references for each Glide clients:

LanguageStandalone ModeCluster Mode
JavaReferenceReference
Node.jsReferenceReference
PythonReferenceReference
GoReferenceReference
PHPReferenceReference
C#ReferenceReference
RubyReferenceReference
from glide import GlideClientConfiguration, NodeAddress
config = GlideClientConfiguration(
addresses=[NodeAddress("localhost", 6379)],
use_tls=False,
request_timeout=1000,
client_name="python_app"
)

Standalone and cluster configurations can customize the library name reported by CLIENT INFO. The library-name override replaces the binding’s default base name, while the client information tag appends attribution in parentheses. Non-empty library-name overrides and client information tags must contain only printable ASCII characters from ! (U+0021) through ~ (U+007E), excluding ( and ).

ClientDefault library name
GoGlideGo
JavaGlideJava
Python asyncGlidePy
Python syncGlidePySync
Node.jsGlideJS

Choose the option that matches how the connection should be identified:

  • Client information tag only (client_info_tag or clientInfoTag) — Appends a parenthesized tag while retaining GLIDE’s default identity, for example GlidePy(my-framework:1.2.3). This is recommended for libraries and frameworks that embed GLIDE because it attributes the embedding layer while the connection still counts toward GLIDE-level adoption metrics.
  • Library-name override only (lib_name or libName) — Replaces the default name, for example custom-client. Use this only when the connection should be presented as a different client, such as through a compatibility layer. The reported name no longer indicates that GLIDE is underneath.
  • Both — Uses the library-name override as the base and appends the client information tag, for example custom-client(my-framework:1.2.3). This combination is uncommon.

The asynchronous and synchronous clients use the same configuration fields:

from glide import (
GlideClientConfiguration,
GlideClusterClientConfiguration,
NodeAddress,
)
standalone_config = GlideClientConfiguration(
addresses=[NodeAddress("localhost", 6379)],
lib_name="custom-client",
client_info_tag="framework:1.2",
)
cluster_config = GlideClusterClientConfiguration(
addresses=[NodeAddress("localhost", 7001)],
lib_name="custom-client",
client_info_tag="framework:1.2",
)

Invalid values raise ValueError when the configuration is constructed.

A dedicated asynchronous standalone monitor uses the same configuration:

from glide import MonitorClient
monitor = await MonitorClient.create(standalone_config)
try:
# Consume monitor messages.
pass
finally:
await monitor.aclose()

The synchronous client provides the equivalent API:

from glide_sync import GlideClientConfiguration, MonitorClient, NodeAddress
standalone_config = GlideClientConfiguration(
addresses=[NodeAddress("localhost", 6379)],
lib_name="custom-client",
client_info_tag="framework:1.2",
)
with MonitorClient.create(standalone_config) as monitor:
# Consume monitor messages.
pass