FAQ

更新时间:
复制 MD 格式

This topic answers frequently asked questions (FAQs) about ApsaraDB for SelectDB.

Advantages of ApsaraDB for SelectDB vs. self-managed Doris

ApsaraDB for SelectDB provides the following advantages:

  • Supports compute-storage separation. Multiple clusters can share storage, which can reduce storage costs by up to 90%.

  • Uses tiered storage with caching and object storage for hot and cold data, which lowers storage costs.

  • You configure only backend (BE) clusters. This eliminates the cost of frontend (FE) resources and lowers the initial setup cost.

  • ApsaraDB for SelectDB is a cloud-native service that is ready to use out-of-the-box. Its visual console and APIs help you automate deployment and O&M, improving operational efficiency.

  • ApsaraDB for SelectDB provides easy-to-use visual tools for data development and management, such as an SQL editor, retrieval and analysis, query audit, session management, and metadata management. These tools reduce developer and administrator workloads.

  • Requires minimal O&M effort.

  • The ApsaraDB for SelectDB kernel is a commercial-grade, cloud-optimized version of Apache Doris. This ensures maturity and stability, backed by professional support from Alibaba Cloud and the SelectDB team.

Advantages of multiple compute clusters

ApsaraDB for SelectDB instance can contain multiple compute clusters. Each cluster, consisting of one or more backend (BE) nodes, acts like a compute resource group or queue in a big data system. All compute clusters within an instance share the following features:

  • Data sharing: All clusters share the same data, preventing redundancy.

  • Compute isolation: Cluster resources are physically isolated, allowing for workload separation. Caches are also isolated, with data caching based on each cluster's access patterns.

  • Multi-read, multi-write: All clusters support concurrent reads and writes. Data written in parallel is immediately available for querying across all clusters after being committed.

These features make multiple compute clusters ideal for use cases such as isolating read/write workloads, separating online and offline analysis, and maintaining distinct production and testing environments.

Why does my subscription instance generate pay-as-you-go bills?

When you purchase a subscription ApsaraDB for SelectDB instance, your upfront payment covers the default cluster. However, the storage that your instance uses is billed separately on a pay-as-you-go basis. As your data grows, the storage usage scales elastically, and you are billed for your actual usage. Additionally, you can create pay-as-you-go clusters within a subscription instance. Therefore, both pay-as-you-go storage and pay-as-you-go clusters can generate additional bills.

Use cases for ApsaraDB for SelectDB

ApsaraDB for SelectDB is primarily used for the following scenarios:

  • Real-time reporting and analysis.

  • Ad hoc multidimensional analysis.

  • Log retrieval and analysis.

  • Data lakehouse analytics.

Does SelectDB support triggers?

ApsaraDB for SelectDB does not support triggers.

Troubleshoot the "connect timed out" error

This error indicates a network connectivity problem between your client and the SelectDB instance. If your client and SelectDB instance are in the same Virtual Private Cloud (VPC) and SelectDB

  1. From your client machine, use the ping command to ping the VPC address of the SelectDB instance. Check for network connectivity between your machine and the SelectDB instance, or use the telnet command to check if database ports 9030 and 8080 are reachable.

  2. Ensure your client's IP address is in the SelectDB whitelist. If not, see Configure a whitelist.

  3. Verify that the client IP address configured in the SelectDB whitelist is correct.

    An office network's public IP address can change frequently. The IP address you see may not be the actual public IP. Use an IP lookup service, such as whatsmyip, to confirm your public IP address.

If your SelectDB instance and client are in different VPCs, you must connect over the internet. Follow these steps:

  1. Apply for a public endpoint for the SelectDB instance. For instructions, see Apply for or release a public endpoint.

  2. Add your client's IP address to the SelectDB whitelist. For instructions, see Configure a whitelist.

    Note

    An office network's public IP address can change frequently. The IP address you see may not be the actual public IP. Use an IP lookup service, such as whatsmyip, to confirm your public IP address.

  3. Connect to the cluster. For instructions, see Connect to an instance.

Cannot connect to data source catalogs

Common causes and solutions are listed below:

  • Cause 1: The target data source and the SelectDB instance are in different VPCs, and there is no network connectivity between them.

    Solution: Resolve the network connectivity issue between the target data source and the SelectDB instance. For more information, see How do I resolve network connectivity issues between a SelectDB instance and a data source?.

  • Cause 2: The data source's IP address is not in the SelectDB whitelist.

    Solution: Obtain the IP address of the data source and add it to the SelectDB whitelist. For instructions, see Configure a whitelist.

    Note

    An office network's public IP address can change frequently. The IP address you see may not be the actual public IP. Use an IP lookup service, such as whatsmyip, to confirm your public IP address.

  • Cause 3: The target data source, such as MySQL or HDFS, has its own whitelist configured.

    Solution: Obtain the IP address of your SelectDB instance and add it to the whitelist of the target data source.

Resolve network issues with data sources

If your SelectDB instance and the data source are in the same VPC and region, check whether each has the other's IP address added to its whitelist. If not, add the required IP addresses. For instructions, see Configure a whitelist.

If your SelectDB instance and the data source do not meet the preceding conditions, you must choose a suitable networking solution to establish connectivity before you configure the whitelists.

Scenario

Solution

Connectivity between on-premises and cloud resources

Connect on-premises and cloud networks

Cross-account VPC connectivity

Connect VPCs across accounts

Cross-region and cross-account VPC connectivity

Use Cloud Enterprise Network to achieve cross-region and cross-account VPC connectivity (Basic Edition)

Connectivity between different VPCs in the same region

Use Cloud Enterprise Network to achieve same-region VPC connectivity (Basic Edition)

Connectivity between different VPCs

Use a VPC peering connection to enable private communication between VPCs

Connectivity over the internet

Use the SNAT feature of an Internet NAT gateway to access the internet

Find the VPC IP CIDR block

The IP range of your ApsaraDB for SelectDB instance is determined by the IPv4 CIDR block of its associated vSwitch. To find it, follow these steps:

  1. Find the vSwitch ID of the instance.

    1. Log on to the ApsaraDB for SelectDB console.

    2. In the top-left corner of the page, select the region where your instance is located. On the Instances page, click the target Instance ID to open the Instance Details page.

    3. On the Instance Details page, find the Network Information section and get the vSwitch ID of the instance.

  2. Find the IPv4 CIDR block for the vSwitch ID.

    1. Go to the Virtual Private Cloud console and open the vSwitches page.

    2. In the top-left corner of the page, select the same region as your ApsaraDB for SelectDB instance.

    3. In the search box, enter the target vSwitch ID and click the search icon.

    4. In the vSwitch list, view the IPv4 CIDR block of the target vSwitch.

Why can't my application connect to SelectDB?

Common causes and solutions are listed below:

  • Cause 1: The network environment is incorrect. Use an internal connection if the application and the instance are in the same VPC. Otherwise, you must apply for a public endpoint and connect over the internet.

    Solution: Check if your application and SelectDB instance are in the same VPC. If they are not, use a public endpoint to connect to the instance. For instructions on how to apply for a public endpoint, see Apply for or release a public endpoint.

  • Cause 2: The whitelist is not configured.

    Solution: Add the IP address of the application server to the whitelist of the SelectDB instance. For instructions, see Configure a whitelist.

  • Cause 3: The security group rules for the ECS instance where the application is running do not allow traffic.

    Solution: Configure the security group to allow traffic. For more information, see Security group operations.

  • Cause 4: A corporate firewall is blocking the connection.

    Solution: Modify the firewall rules to allow the connection.

  • Cause 5: The username or password in the connection string contains special characters such as !@#$%^&*()_+=. These characters can cause connection failures if not escaped.

    Solution: Escape special characters in the connection string by using the following rules.

    ! : %21
    @ : %40
    # : %23
    $ : %24
    % : %25
    ^ : %5e
    & : %26
    * : %2a
    ( : %28
    ) : %29
    _ : %5f
    + : %2b
    = : %3d

    For example, if the password is ab@#c, the password in the connection string becomes ab%40%23c after the special characters are escaped.

  • Cause 6: Your account has an overdue payment. An overdue payment locks your instance, making it inaccessible.

    Solution: Check if your Alibaba Cloud account has an overdue payment. If it does, complete the payment immediately. For more information about how to check your account balance, see What is a funding account?.

How do I read data from SelectDB?

You can use the following common methods:

  • Read data by using JDBC: Because SelectDB is compatible with the MySQL protocol, you can use JDBC to read data from SelectDB, similar to how you read data from MySQL. This method is suitable for small datasets (such as tables within tens of GB) because it is simple and easy to implement.

  • Read data by using the Flink Doris Connector: The Flink Doris Connector can connect directly to the BE nodes of a SelectDB instance for high-efficiency data reading. For security reasons, you must contact SelectDB technical support to request the required access permissions.

Back up or restore data

SelectDB does not currently support data backup and restoration from the console. Use the following methods instead.

Method

Description

Use case

Use mysqldump

  • Back up data: Use mysqldump to export SelectDB data.

  • Restore data: Use mysqldump to re-import the exported data into SelectDB.

Suitable for full database backup and restoration of small datasets (up to tens of gigabytes).

Use SELECT INTO OUTFILE

  • Back up data: Use SELECT INTO OUTFILE to export SelectDB data.

  • Restore data: Use OSS Load to re-import the exported data into SelectDB.

Suitable for backing up and restoring datasets of any size, but only supports single-table operations.

View backend (BE) nodes

After you connect to your instance, run the following command to view the BE nodes:

SHOW backends;

Add backend (BE) nodes

BE nodes are fully managed. You do not need to add or manage them after you purchase a SelectDB instance.

Obtain a BE cluster endpoint

Typically, you can use the instance endpoint to read from and write to SelectDB and do not need the BE cluster endpoint. If you need to connect directly to a BE cluster for tasks like data import or monitoring, follow these steps:

  1. Get the instance endpoint.

    On the Instance Details page in the ApsaraDB for SelectDB console, find the VPC Endpoint or Public Endpoint of your instance.

  2. Get the BE cluster endpoint.

    On the Cluster Management page of your instance, copy the corresponding BE cluster ID. Replace the prefix of the instance endpoint with the BE cluster ID to form the BE cluster endpoint. For example, if the instance endpoint is selectdb-cn-g4***.selectdbfe.rds.aliyuncs.com, the BE cluster endpoint is selectdb-gs***.selectdbbe.rds.aliyuncs.com.

  3. Use the correct port for the BE cluster.

    Use port 8040 for Stream Load imports and port 8060 for scraping monitoring metrics.

Handle delimiters in Stream Load

Specify new delimiters and update the data file so the delimiter characters in your data do not conflict with the chosen delimiters.

Data contains the row delimiter

If your data contains the default row delimiter \n as a data value (not a row boundary), specify a different row delimiter.

Example — original file:

Zhang San\n,25,Shaanxi
Li Si\n,30,Beijing

Steps:

  1. Set a new row delimiter: add -H "line_delimiter:\r\n" to your request.

  2. Update the file to end each row with the new delimiter:

    Zhang San\n,25,Shaanxi\r\n
    Li Si\n,30,Beijing\r\n

Data contains the column delimiter

If your data contains the default column delimiter \t (tab) as a data value, specify a different column delimiter.

Example — original file:

Zhang San\t  25  Shaanxi
Li Si\t  30  Beijing

Steps:

  1. Set a new column delimiter: add -H "column_separator:," to your request.

  2. Update the file to separate columns with the new delimiter:

    Zhang San\t,25,Shaanxi
    Li Si\t,30,Beijing