diff --git a/examples/node/index.ts b/examples/node/index.ts index 8c49d1c..f14095d 100644 --- a/examples/node/index.ts +++ b/examples/node/index.ts @@ -11,6 +11,7 @@ async function sendPingToNode() { // Check `RedisClientConfiguration/ClusterClientConfiguration` for additional options. const client = await RedisClient.createClient({ addresses: addresses, + // if the server uses TLS, you'll need to enable it. Otherwise the connection attempt will time out silently. // useTLS: true, clientName: "test_standalone_client", }); @@ -39,7 +40,8 @@ async function sendPingToRandomNodeInCluster() { // Check `RedisClientConfiguration/ClusterClientConfiguration` for additional options. const client = await RedisClusterClient.createClient({ addresses: addresses, - useTLS: true, + // if the cluster nodes use TLS, you'll need to enable it. Otherwise the connection attempt will time out silently. + // useTLS: true, clientName: "test_cluster_client", }); // The empty array signifies that there are no additional arguments. diff --git a/examples/python/client_example.py b/examples/python/client_example.py index eadc9ac..88456cf 100755 --- a/examples/python/client_example.py +++ b/examples/python/client_example.py @@ -40,7 +40,8 @@ async def test_standalone_client(host: str = "localhost", port: int = 6379): # Check `RedisClientConfiguration/ClusterClientConfiguration` for additional options. config = BaseClientConfiguration( addresses=addresses, - client_name = 'test_standalone_client' + client_name="test_standalone_client" + # if the server use TLS, you'll need to enable it. Otherwise the connection attempt will time out silently. # use_tls=True ) client = await RedisClient.create(config) @@ -58,7 +59,8 @@ async def test_cluster_client(host: str = "localhost", port: int = 6379): # Check `RedisClientConfiguration/ClusterClientConfiguration` for additional options. config = BaseClientConfiguration( addresses=addresses, - client_name = 'test_cluster_client' + client_name="test_cluster_client" + # if the cluster nodes use TLS, you'll need to enable it. Otherwise the connection attempt will time out silently. # use_tls=True ) client = await RedisClusterClient.create(config) diff --git a/node/src/BaseClient.ts b/node/src/BaseClient.ts index 906a659..9d672ed 100644 --- a/node/src/BaseClient.ts +++ b/node/src/BaseClient.ts @@ -121,6 +121,8 @@ export type BaseClientConfiguration = { }[]; /** * True if communication with the cluster should use Transport Level Security. + * Should match the TLS configuration of the server/cluster, + * otherwise the connection attempt will fail. */ useTLS?: boolean; /** diff --git a/python/python/glide/config.py b/python/python/glide/config.py index 76d41a7..3051668 100644 --- a/python/python/glide/config.py +++ b/python/python/glide/config.py @@ -117,6 +117,7 @@ def __init__( ]. If none are set, a default address localhost:6379 will be used. use_tls (bool): True if communication with the cluster should use Transport Level Security. + Should match the TLS configuration of the server/cluster, otherwise the connection attempt will fail credentials (RedisCredentials): Credentials for authentication process. If none are set, the client will not authenticate itself with the server. read_from (ReadFrom): If not set, `PRIMARY` will be used.