By default, ApsaraDB for Redis provides internal endpoints. To access an ApsaraDB for Redis instance over the Internet, you must apply for a public endpoint for the instance.

Prerequisites

The instance meets one of the following requirements:
  • The instance is an instance of the ApsaraDB for Redis Community Edition or a performance-enhanced instance of the ApsaraDB for Redis Enhanced Edition (Tair). For more information about performance-enhanced instances, see Performance-enhanced instances.
  • The instance is a persistent memory-optimized or storage-optimized instance of the ApsaraDB for Redis Enhanced Edition (Tair). For more information about persistent memory-optimized instances and storage-optimized instances, see Persistent memory-optimized instances and Storage-optimized instances.

Precautions

For security concerns, if password-free access over a virtual private cloud (VPC) is enabled for an instance and you use a public endpoint to connect to the instance, you still need to enter a password.
Note If a public endpoint cannot be allocated to an instance, you can update the instance to the latest minor version. For more information, see Update the minor version.

Network types of endpoints

Network type Description
VPC
  • A VPC is a private network dedicated to you on Alibaba Cloud. VPCs are logically isolated from each other at Layer 2 to provide higher security and performance. For more information about VPCs, see What is a VPC?
  • By default, an ApsaraDB for Redis instance provides a VPC endpoint. You can connect to an ApsaraDB for Redis instance over a VPC to achieve higher security and performance.
Classic network Cloud services on the classic network are not isolated. Unauthorized access can be blocked only by using security groups or whitelists. If your cloud services are deployed in the classic network, we recommend that you change the network type to VPC. For more information, see Change the network type from classic network to VPC.
Public Security risks exist when you connect to an ApsaraDB for Redis instance over the Internet. For this reason, ApsaraDB for Redis does not provide public endpoints by default. To connect to an ApsaraDB for Redis instance over the Internet, you can apply for a public endpoint for the instance in the following scenarios:
  • The device on which the client is installed, such as an Elastic Compute Service (ECS) instance, and the ApsaraDB for Redis instance are not deployed in the same VPC. For more information about ECS instances, see What is ECS?
  • The device on which the client is installed and the ApsaraDB for Redis instance are not deployed in the same region.
  • The client is installed on a device outside of Alibaba Cloud, such as an on-premises machine.
Note
  • You are not charged for applying for public endpoints. You are also not charged for the traffic that is generated after you use public endpoints to connect to your instances.
  • If you use public endpoints, data security is compromised. Proceed with caution.
  • To accelerate and secure data transmission, we recommend that you migrate your applications to an ECS instance that is deployed in the same region and has the same network type as the ApsaraDB for Redis instance. This allows you to connect to the ApsaraDB for Redis instance by using an internal endpoint.

Procedure

  1. Log on to the ApsaraDB for Redis console and go to the Instances page. In the top navigation bar, select the region in which the instance is deployed. Then, find the instance and click the instance ID.
  2. In the Connection Information section, click Apply for Endpoint next to Public Access.
  3. Optional: In the panel that appears, enter an endpoint and a port number.
    Parameter Description
    Endpoint
    • You can modify only the prefix of the endpoint. By default, the prefix is the instance ID.
    • The prefix must be 8 to 64 characters in length and can contain lowercase letters and digits. It must start with a lowercase letter.
    Port When you modify the endpoint, you can also modify the port number. Valid values for the port number: 1024 to 65535.
  4. Click OK.
    After the application is submitted, the public endpoint is displayed in the Connection Information section.

Related API operations

Operation Description
AllocateInstancePublicConnection Applies for a public endpoint for an ApsaraDB for Redis instance.

What to do next

Use a public endpoint to connect to an ApsaraDB for Redis instance