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.

The network type of the endpoint

The network type of the endpoint 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 through 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 in a classic network, we recommend that you change the network type to VPC. For more information, see Switch to VPC network.
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 to which the client belongs, for example, the ECS instance, and the ApsaraDB for Redis instance are not running in the same VPC.
  • The device to which the client belongs and the ApsaraDB for Redis instance are not deployed in the same region.
  • The client is running on a device outside of Alibaba Cloud, such as an on-premises machine.

Procedure

  1. Log on to the ApsaraDB for Redis console.
  2. On the top of the page, select the region where the instance is deployed.
  3. On the Instance List page, click the Instance ID of the instance.
  4. In the Connection Information section, click Apply for Public Endpoint.
    Figure 1. Apply for a public endpoint
    Apply for a public endpoint
  5. Optional:In the dialog box 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 To modify the endpoint, You can enter a 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 API operations

API 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