This document describes the multi-language client connection methods supported by Tencent Cloud Distributed Cache, helping you quickly choose the appropriate client and connection mode based on your business development language and deployment architecture, and navigate to the connection example for the corresponding language.
Overview
Distributed Cache is fully compatible with the Redis protocol and supports mainstream Redis clients in the industry. Clients connect to instances through the unified VIP address provided by the Proxy layer, with the same usage as connecting to standalone Redis. Proxy hides the details of backend shards.
Obtaining Connection Information
2. In the instance list, click the target instance ID to go to the instance details page.
3. In the Network Information section, obtain the VIP address and port of the instance (default: 6379).
4. In the Configuration Information section, obtain the connection password of the instance.
Authentication Method Description
Clients connect through the Proxy layer, and account information is concatenated into the password field before being passed in.
|
Password-free authentication | No password required | Applicable only to access within a VPC, with lower security. |
Default account | Instance ID:Password
| For example, crs-xxxx:password |
Custom account | Username@Password
| For example, readonly_user@password |
Network and Security
Ensure that the client and the instance are in the same VPC, or that network connectivity is correctly configured (for example, through Peering Connection or CCN).
Ensure that the security group of the instance allows access to the port used by the client (default: 6379).
To access over the public network, enable the public network address in the console and configure public network security group rules.
For scenarios that require secure data transmission, you can enable SSL Encryption. For SSL connection examples in each language, refer to the corresponding language documentation.
Connection Verification
After completing the connection configuration, you can verify whether the connection is successful by running the following basic commands:
Run the PING command. A PONG response indicates a normal connection.
Run the SET and GET commands to verify that data can be read and written normally.
Common causes of connection failures include network unreachability, security group not allowing access, incorrect password format, and incompatible client version.