If you want to test or manage an ApsaraDB for Redis instance that is deployed on an
on-premises machine, you can apply for a public endpoint for the instance and connect
to the instance over the Internet.
Precautions
No traffic fees are charged when you connect to an ApsaraDB for Redis instance over
the Internet. However, this increases network latency, compromises the performance
of the ApsaraDB for Redis service, and results in security risks. We recommend that
you connect to ApsaraDB for Redis instances through VPC for lower network latency and higher security.
Procedure
- Select the following methods to obtain the public IP address of the on-premises machine
based on the operating system:
- Linux operating system
Run the curl ipinfo.io |grep ip command on the on-premises machine to obtain the public IP address. The returned
result is shown in the following figure.

- Windows operating system
On the on-premises machine, visit ipinfo to obtain the public IP address of the on-premises machine.
- Add the public IP address of the on-premises machine to the whitelist of the ApsaraDB
for Redis instance. For more information, see Configure whitelists.
- Apply for a public endpoint for the ApsaraDB for Redis instance. For more information,
see .
- Use the redis-cli tool or a Redis client program to connect to the ApsaraDB for Redis
instance based on the obtained public endpoint.