All Products
Search
Document Center

Tair (Redis® OSS-Compatible):View endpoints

Last Updated:Dec 06, 2024

To connect to a Tair (Redis OSS-compatible) instance, you must obtain the endpoint of the instance. The virtual IP address (VIP) of an instance may change due to maintenance or configuration changes. To ensure service availability, we recommend that you connect to an instance by using an endpoint (such as r-2vcl6xcftp1nu7****.com). You can view different types of endpoints in the console.

Prerequisites

The IP address of your client is added to a whitelist of the Tair instance. For more information, see Configure whitelists.

Procedure

  1. Log on to the 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 the instance ID.

  2. In the Connection Information section, view different types of endpoints and port numbers.

    Note
    • If you want to connect to the instance over the Internet, apply for a public endpoint for the instance. For more information, see Apply for a public endpoint for an instance.

    • You cannot apply for a public endpoint for a cloud-native cluster instance that runs in direct connection mode. For more information, see View endpoints.

    Then, you can connect to the instance. For more information, see Use redis-cli to connect to an instance.

Proxy mode and direct connection mode

Tair (Redis OSS-compatible) supports the following connection modes:

  • Proxy mode

    Clients connect to Tair instances by using proxy nodes.

    Proxy nodes are developed in-house to enable architecture changes, route commands, balance loads, perform failovers, and run in-house commands for Tair instances in proxy mode. The connection mode offers several advantages, including aggregated connections, enhanced read performance, and ease of use. This can help you design more efficient business systems. For more information, see Features of proxy nodes.

  • Direct connection mode

    For standard master-replica instances, clients directly connect to the master nodes of the instances.

    For cluster instances, clients directly connect to the instances, and tasks such as load balancing are handled by the instances. This is exactly the same as the direct connection to native Redis clusters.

Supported network types and connection modes for instances of different architectures

In the following table, ️️️️️️✔️ indicates that the feature is supported and ❌ indicates that the feature is not supported.

Deployment mode

Instance architecture

Connection mode

VPC

Internet

Cloud-native

Standard architecture

Direct connection mode

✔️

✔️

Cluster architecture1

Direct connection mode

✔️

Proxy mode

✔️

✔️

Read/write splitting architecture

Proxy mode

✔️

✔️

Classic

Standard architecture

Direct connection mode

✔️

✔️

Cluster architecture2

Proxy mode

Direct connection mode

✔️

✔️

Read/write splitting architecture

Proxy mode

✔️

✔️

Important

1Cloud-native cluster instances support only the direct connection mode or the proxy mode.

2Classic cluster instances support both the direct connection mode and the proxy mode.

VPC and Internet

Network types supported by Tair (Redis OSS-compatible):

  • VPC

    A virtual private cloud (VPC) is a private network that is isolated from other networks at the network layer on top of physical-layer protocols. VPCs provide high security, reliability, flexibility, scalability, and ease of use. For more information, see What is a VPC?

    Scenario: An Elastic Compute Service (ECS) instance is deployed in the same VPC as your Tair instance and the ECS instance can connect to your Tair instance over the VPC. This achieves higher security and lower network latency.

  • Internet

    For more information, see Apply for a public endpoint for an instance.

    Although you are not charged for the traffic to connect to Tair instances over the Internet, the connection may incur risks. We recommend that you use a VPC to ensure higher security.

    Scenario: Your Tair instance can be connected over the Internet by using your on-premises device, an ECS instance deployed in a different VPC, or a device within a third-party cloud service.

FAQ

Why is the endpoint of an instance not displayed after I connect to the instance?

The endpoint of the instance is displayed only after you add the IP address of your client to a whitelist of the instance. For more information, see Configure whitelists.

Why am I unable to find the entry point to apply for a public endpoint for an instance?

No option is available to apply for a public endpoint because of the following reasons:

  • If the VPC endpoint is not displayed in the Connection Information section, no whitelist is configured for the instance. In this case, you must configure a whitelist. For more information, see Configure whitelists.

  • Public endpoints are not supported for cloud-native cluster instances in direct connection mode. You can connect to these instances over VPC.

    Note

    Check whether the instance is a cloud-native cluster instance that runs in direct connection mode. For more information, see How do I know whether an instance is a cloud-native cluster instance that runs in direct connection mode?

    If the ECS instance on which your application resides is not in the same VPC as the Tair (Redis OSS-compatible) instance, or if your application is not hosted on Alibaba Cloud, you can configure the cloud-native cluster instance to run in proxy mode. A cloud-native cluster instance cannot be directly switched from the direct connection mode to the proxy mode. You can use the instance restoration feature to migrate and reconfigure the setup. This involves restoring backup data from the source instance to a new instance and selecting Proxy as the connection mode. For more information, see Restore data from a backup set to a new instance.

    Warning

    After the new cloud-native cluster instance is created with a new connection mode, modify the connection code accordingly. Otherwise, the instance cannot be connected. Proceed with caution.

How do I determine whether an instance is a cloud-native cluster instance that runs in direct connection mode?

You can log on to the console and go to the Instance Information page to check whether the instance is a cluster instance deployed in cloud-native mode.image

In the Connection Information section of the Instance Information page, check whether the direct connection mode is used.

image

You cannot apply for a public endpoint for a cloud-native cluster instance that runs in direct connection mode. In the Connection Information section, the Apply for Endpoint button that corresponds to Public Access is dimmed and cannot be clicked.

How do I enable the proxy mode for an instance?

  • By default, read/write splitting instances and classic cluster instances provide proxy endpoints. You do not need to manually enable the proxy mode for the preceding instances.

  • When you create a cloud-native cluster instance, you can select the proxy mode or the direct connection mode. After you create the instance, you cannot switch the instance from the direct connection mode to the proxy mode or from the proxy mode to the direct connection mode.

  • Standard instances use the master-replica architecture. A standalone instance has only one master node. You do not need to enable the proxy mode for standard or standalone instances. Only the cluster architecture and read/write splitting architecture support the proxy mode.

Can I connect to a replica node? Why am I unable to see the endpoint of a replica node?

The replica nodes of Tair (Redis OSS-compatible) instances provide redundancy and failover support. The nodes stand by to take over when the master node fails to ensure high availability. You cannot directly connect to replica nodes.

References