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

Prerequisites

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

Network types of an endpoint

Network type Description
VPC
  • A virtual private cloud (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.
  • By default, an ApsaraDB for Redis instance provides an endpoint that you can use in a VPC. You can connect to an ApsaraDB for Redis instance over a VPC to achieve higher security and performance.
Classic network Cloud services in a classic network are not isolated. Unauthorized access to cloud services is blocked only by 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.
Internet Security risks exist when you connect to an ApsaraDB for Redis instance over the Internet. Therefore, 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 in the following scenarios:
  • The device on which the client is installed, such as an ECS instance, and the ApsaraDB for Redis instance are not deployed in the same VPC.
  • 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.

Procedure

  1. Log on to the ApsaraDB for Redis console.
  2. In the top navigation bar of the page, select the region where the instance is deployed.
  3. On the Instances page, click the ID of the instance.
  4. In the Connection Information section, click Apply for Endpoint on the right side of Public Access.
    Figure 1. Apply for a public endpoint
    Apply for a public endpoint
  5. 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 change the endpoint, you can also change the port number by entering a new port number from 1024 to 65535.
  6. Click OK.
    After the application is submitted, the public endpoint is displayed in the Connection Information section.

Related 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