All Products
Search
Document Center

ApsaraDB RDS:Create and connect to a DuckDB-based analytical primary instance

Last Updated:Dec 10, 2025

This topic describes how to create and connect to a DuckDB-based analytical primary instance in the ApsaraDB RDS console.

Usage notes

If you use a RAM user to create the instance, ensure that the AliyunRDSFullAccess and AliyunBSSOrderAccess policies are attached to the RAM user. For more information, see Authorize RAM resources.

Create a DuckDB-based analytical primary instance

  1. Go to the RDS instance creation page.

  2. Select a Billing Method. The following billing methods are supported:

    • Pay-as-you-go: Suitable for short-term use or for trying out RDS instances. You can release the instance at any time to stop billing. This topic uses this method as an example.

    • Subscription: Suitable for long-term use and is more cost-effective than pay-as-you-go.

  3. Select a Region.

    Important

    You cannot change the region of an RDS instance after it is created. Select the region based on your business requirements.

    • If you have an Elastic Compute Service (ECS) instance and want it to communicate with the RDS instance over an internal network, select the same region as the ECS instance. Otherwise, the ECS instance can access the RDS instance only over the Internet, which may downgrade the instance performance.

    • To connect to the RDS instance from a physical device, such as a local server or computer, other than an ECS instance, select a region that is geographically close to the device and connect to the RDS instance using its public endpoint. This reduces network latency.

  4. Configure Database Engine, Edition, Product Type, and Storage Type.

    1. Set Database Engine to MySQL_DuckDB and the select the 8.0 version.

    2. Select an Edition. Only RDS Cluster Edition is supported.

    3. Select a Product Type. Only Standard is supported.

    4. Select a Storage Type. Only Premium ESSD is supported.

      (Optional) You can enable disk encryption by selecting Cloud Disk Encryption.

  5. Configure the instance network. The Network Type parameter is fixed to VPC.

    1. Select a VPC.

      You cannot change the VPC after the instance is created. To connect to the RDS instance from an ECS instance over an internal network, select the same VPC as the ECS instance.

    2. Select a value for Add to Whitelist.

      We recommend selecting Yes to add the CIDR block of the VPC to the whitelist of the RDS instance. Otherwise, you must manually add it.

  6. Select zones and vSwitches, the number of secondary nodes, and a deployment method.

    • Select a zone and vSwitch

      • A zone is an independent physical area within a region.

        Accessing an RDS instance from an ECS instance in the same zone is slightly quicker than accessing it from an ECS instance in a different zone.

      • A vSwitch is a basic network device within a VPC that connects different cloud resources. When you create a cloud resource in a VPC, you must specify the vSwitch for that resource.

        You can select an existing vSwitch or click Create vSwitch to create a new one. For more information about the parameters, see Create and manage a vSwitch.

    • Select the number of secondary nodes

      To ensure high availability, you must configure at least one secondary node. You can configure one or two secondary nodes when you create the instance. After the instance is created, you can add nodes to scale out to a maximum of eight secondary nodes.

    • Select a deployment method

      • Multi-zone Deployment (Recommended): The primary and secondary nodes are located in different zones within the same region. This provides cross-zone disaster recovery.

        If you select Multi-zone Deployment, you must configure Zone and Network of Secondary Node for the instance.

      • Single-zone Deployment: The primary and secondary nodes are located in the same zone.

  7. Select an Instance Type.

    1. Select a Category. Currently, only Dedicated instance types (with dedicated CPU, memory, storage, and I/O resources) are supported.

    2. Select a instance type (number of CPU cores and memory). For a list of instance types, see DuckDB-based analytical primary instance types.

      Important

      For Cluster Edition instances, the reference price displayed in the Instance Type section is the price for a single node. For example, if you purchase a Cluster Edition instance with one primary node and two secondary nodes, the total price of the instance is three times the reference price. You can move your mouse over View Details next to the price in the lower-right corner to view the details.

  8. Select a Storage Capacity.

    The storage capacity ranges from 20 GB to 128,000 GB with a minimum step size of 5 GB.

    Note

    You can turn on the Automatic Storage Expansion switch and set the trigger conditions and the upper limit for automatic expansion. When triggered, the system automatically expands the storage by 5 GB or 15% of the current storage capacity (whichever is larger). This prevents the instance from being locked due to insufficient storage space.

  9. (Optional) Configure more custom parameters. If you have no special requirements, keep the default values for the parameters.

    Parameter

    Description

    Port

    You can initialize the port when creating the instance. The value can range from 1000 to 65534.

    Default Storage Engine

    Only DuckDB is supported.

    Time Zone

    Set the time zone for the instance.

    Table Name Case Sensitivity

    The default is Case-insensitive. If your local database is case-sensitive, you can select Case-sensitive to facilitate data migration.

    Release Protection

    Select this parameter to enable instance release protection for pay-as-you-go instances. This prevents accidental release of pay-as-you-go instances. For more information, see Enable or disable instance release protection.

    Minor Engine Version Update Policy

    Set the minor engine version update policy:

    • Auto Upgrade (Recommended): The instance is automatically upgraded to the latest minor version within the maintenance window. You can change the upgrade time on the Scheduled Events page.

    • Manual Upgrade: Manually upgrade the instance on its Basic Information page.

    Note

    If you do not want to use the latest minor version, select Select Minor Engine Version to specify a minor version.

    Resource Group

    Select a default or custom resource group to facilitate instance management.

    Instance Name

    Enter a description for the instance to make it easy to identify.

    Tags

    If you have many instances, you can attach tags to them for classification and management. For more information, see Filter instances by tag.

    Privileged Account

    You can select Configure Now, enter an account and password to create a privileged account. You can also select Configure Later to create a privileged account later. For more information about privileged accounts, see Create a privileged account.

  10. Confirm the order information, quantity, and subscription duration (for subscription instances only). Then, click Confirm Order and complete the payment.

    Note
    • For subscription instances, different subscription durations correspond to different discounts. You can move your mouse over View Details in the lower-right corner to view the fee details.

    • For subscription instances, we recommend selecting Enable Auto-renewal to prevent business interruptions caused by failing to renew the instance on time. If you purchase by month, the auto-renewal cycle is one month. If you purchase by year, the auto-renewal cycle is one year. The actual cycle depends on your order. You can cancel auto-renewal at any time. For more information, see Auto-renewal.

  11. View the instance.

    Go to the Instances page. In the top navigation bar, select the region where the instance is located. Find the newly created instance based on its Creation Time.

    Note

    Instance creation takes about 1 to 10 minutes. Refresh the page to view the status.

Create a database account

For more information, see Create a database account.

Connect to a DuckDB-based analytical primary instance

  1. Go to the ApsaraDB RDS Instances page, select the region of the instance in the top navigation bar, and then click the ID of the target instance.

  2. On the Basic Information page, find the Instance Topology Management > Database Connection section, view the endpoint of the DuckDB-based analytical primary instance.

    Note

    A DuckDB-based analytical primary instance provides a cluster read/write splitting endpoint, a cluster read-only endpoint, and a node-level direct connection endpoint. You can view the appropriate endpoint based on your connection scenario.

  3. Connecting to the DuckDB-based analytical primary instance in the same way as a regular RDS for MySQL instance. For more information, see the following topics:

References