检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
The following operations are based on an example of accessing a Redis instance on a client on an elastic cloud server (ECS). Prerequisites A Redis instance is created, and is in the Running state. To create a Redis instance, see Buying a DCS Redis Instance.
Generally, VPCs are isolated from each other and an ECS cannot access a DCS instance that belongs to a different VPC from the ECS. You can establish VPC peering connections to allow the ECS to access the DCS instance across VPCs.
The following operations are based on an example of accessing a Redis instance on a client on an elastic cloud server (ECS). Notes and Constraints The operations described in this section apply only to single-node, master/standby, and Proxy Cluster instances.
the Redis Instance and the ECS The ECS where the client is located must be in the same VPC as the Redis instance and be able to communicate with the Redis instance.
the Redis Instance and the ECS The ECS where the client is located must be in the same VPC as the Redis instance and be able to communicate with the Redis instance.
Configure ECS firewalls. Configure firewall filtering rules for the ECS where your client runs. Set the instance password. Configure a whitelist. redis-cli usage Hide the password. Problem: If the -a <password> option is used, the password may show up when the ps command is run.
The following operations are based on an example of accessing a Redis instance on a client on an elastic cloud server (ECS).
An Elastic Cloud Server (ECS) has been created. For details about how to create an ECS, see Purchasing a Custom ECS. Select the same VPC, subnet, and security group as the DCS Redis Cluster instance, and bind EIPs to the ECS. Installing the Rump Log in to the ECS.
Check items: Connection Between the Redis Instance and the ECS Public Access Password Instance Configuration Client Connections Bandwidth Redis Performance Redis authentication failed.
The following operations are based on an example of accessing a Redis instance on a client on an elastic cloud server (ECS). Notes and Constraints The operations described in this section apply only to single-node, master/standby, and Proxy Cluster instances.
Solution 2: Modify the tcp_max_tw_buckets parameter of the ECS where the client is located. In this solution, the ports used by TIME-WAIT connections are reused. However, if retransmission occurs between the ECS and the backend service, the connection may fail.
The following operations are based on an example of accessing a Redis instance on a client on an elastic cloud server (ECS). Notes and Constraints The operations described in this section apply only to single-node, master/standby, and Proxy Cluster instances.
server 64-bit Test tool A single ECS is used for the test.
Test Environment Redis instance specifications Redis 6.0 | Basic edition | 8 GB | Master/Standby Redis 6.0 | Basic edition | 32 GB | Master/Standby ECS flavors General compute-plus | 8 vCPUs | 16 GiB | c7.2xlarge.2 ECS image Ubuntu 18.04 server 64-bit Test tool A single ECS is used
An Elastic Cloud Server (ECS) has been created. For details about how to create an ECS, see Purchasing a Custom ECS. Select the same VPC, subnet, and security group as the DCS Redis Cluster instance, and bind EIPs to the ECS.
An Elastic Cloud Server (ECS) has been created. For details about how to create an ECS, see Purchasing an ECS. Select the same VPC, subnet, and security group as the DCS Redis Cluster instance.
Application The client of the instance, which is the application running on an Elastic Cloud Server (ECS). DCS Redis instances are compatible with Redis, and can be accessed through open-source clients.
The following operations are based on an example of accessing a Redis instance on a client on an elastic cloud server (ECS). To access a Redis 3.0 instance over a public network, see Connecting to Redis 3.0 over a Public Network on redis-cli.
Application The client of the instance, which is the application running on an Elastic Cloud Server (ECS). DCS Memcached instances are compatible with the Memcached protocol, and can be accessed through open-source clients.
The ECS that serves as a client and the DCS instance that the client will access must belong to the same VPC. In the application development and debugging phases, you can also use SSH to access your instance in the local environment.