By default, ApsaraDB for Redis provides Virtual Private Cloud (VPC) endpoints for instances. To connect to an instance over the Internet, you must apply for a public endpoint for the instance first.

Precautions

  • You cannot apply for public endpoints for cloud disk-based cluster instances in direct connection mode.
  • For security concerns, if password-free access over a VPC is enabled for your ApsaraDB for Redis instance and you use a public endpoint to connect to the instance, you still need to enter a password.
  • Public endpoints may expose your ApsaraDB for Redis instance to security risks. Proceed with caution.

Network types of endpoints

Network typeDescription
VPC
  • A VPC is a private network dedicated to you on Alibaba Cloud. VPCs are logically isolated from each other 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 networkCloud services deployed in 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.
InternetSecurity 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
  • 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 Redis instance. This allows you to connect to the instance by using a VPC endpoint.
  • The bandwidth and the number of connections for the instance are shared by connections to the instance over public and VPC endpoints. For example, assume that the bandwidth of an instance is 96 MB/s. If connections to the instance over VPC endpoints use 70 MB/s, connections to the instance over public endpoints can use up to 26 MB/s bandwidth.

Billing

You are not charged for applying for public endpoints and the traffic that is generated when you use public endpoints to connect to your instances.

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 that you want to manage resides. Then, find the instance and click its ID.
  2. In the Connection Information section, click Apply for Endpoint to the right of Public Access.
    Note If the instance is a cloud disk-based cluster instance in direct connection mode, the Apply for Endpoint button is not displayed or is dimmed.
  3. In the panel that appears, enter an endpoint and a port number.
    ParameterDescription
    Endpoint
    • You can modify only the prefix of the endpoint. By default, the prefix is the instance ID.
    • The prefix must be 8 to 40 characters in length and can contain lowercase letters and digits. It must start with a lowercase letter.
    PortWhen you modify the endpoint, you can also modify the port. Valid values for the port: 1024 to 65535.
  4. Click OK.
    After the application is submitted, the public endpoint is displayed in the Connection Information section.

Related API operations

OperationDescription
AllocateInstancePublicConnectionApplies for a public endpoint for an ApsaraDB for Redis instance.

FAQ

  • Q: What do I do if the Current engine version does not support operations error is reported?

    A: This error is reported because the instance uses an outdated minor engine version. Update the minor version and try again. For more information, see Update the minor version.

What to do next

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