Add a DuckDB analytical read-only node to your RDS MySQL Cluster Edition instance to enable real-time analytical capabilities alongside your transactional workloads.
Prerequisites
Before adding a DuckDB analytical read-only node, ensure your primary instance meets these requirements:
|
Limit |
Requirement |
|
Product series |
Cluster Edition |
|
Database version |
MySQL 8.0, 5.7 |
|
Storage type |
high-performance cloud disk, ESSD cloud disk |
|
Storage space |
Greater than or equal to 10 GB and less than or equal to 32,000 GB |
|
Disabled |
|
|
Disabled. Adding a DuckDB node and enabling MGR are mutually exclusive. |
|
|
InnoDB node |
The instance must have at least one InnoDB standby node. |
Billing
The DuckDB analytical read-only node is billed like a standard read-only instance based on product series, instance type, storage type, and storage space. The actual cost is displayed on the purchase page.
Free trial and hands-on experience
For free trial and hands-on experience details, see DuckDB analytical read-only instance overview.
Precautions
-
Creation time: When you create a DuckDB analytical read-only node, the system synchronizes all data from the primary instance to the new node and automatically converts the data to a columnar storage format. This process takes longer than creating a regular InnoDB node. The duration depends on the data volume of the primary instance.
-
Replication: Data is replicated asynchronously between the DuckDB analytical read-only node and the primary instance.
-
Foreign key constraints: During the creation process, the system automatically removes foreign keys from the table schema. This means the DuckDB analytical read-only node does not enforce foreign key constraints.
-
High availability and disaster recovery:
-
DuckDB analytical read-only nodes do not participate in the leader election process of the primary instance.
-
A DuckDB analytical read-only node cannot be used as a disaster recovery node for the primary and standby InnoDB nodes.
-
-
Schema limitations:
-
Only tables with a character set of
utf8orutf8mb4are supported. -
Partitioned tables are not supported.
-
Tables without a business primary key are not supported. A business primary key can be a
Primary Keyor aUNIQUEconstraint on a non-null column.
NoteFor tables that do not meet these conditions, the DuckDB analytical read-only node uses the InnoDB engine. You can still access and query the data in these tables normally. You can run the following SQL statement to find potentially incompatible tables in your instance:
SELECT table_schema, table_name, engine FROM information_schema.tables WHERE table_schema NOT IN ('mysql', 'sys', 'information_schema', 'performance_schema') AND engine = 'InnoDB'; -
-
Compatibility: For more information about compatibility with SQL syntax, functions, and other features, see Compatibility notes for DuckDB analytical instances.
Add a DuckDB analytical read-only node
You can add a DuckDB analytical read-only node to an eligible RDS MySQL Cluster Edition instance at any time. This process does not affect workloads on the primary instance.
Procedure
-
Log on to the RDS console. In the navigation pane on the left, click Instances. In the top navigation bar, select a region. Then, click the ID of the target instance.
-
To add the DuckDB analytical read-only node, use one of the following methods:
-
Method 1: On the Instances page, find the target instance, and in the Actions column, choose More > Create DuckDB Read-only Node.
-
Method 2: On the instance details page, click Create DuckDB Read-only Node in the upper-right corner.
-
Method 3: On the instance details page, go to the Instance Topology Management > Database Nodes section, and click Add or Delete Node. In the dialog box that appears, select Add read-only nodes for DuckDB analysis and click Next.
-
-
Configure the DuckDB analytical read-only node. The following table describes the key parameters.
Parameter
Description
Billing Method
Both subscription and pay-as-you-go are supported. Serverless is not supported.
Edition
Basic Edition, High-availability Edition.
Storage Type
Same as the primary instance.
Product Type
Only Standard Edition is supported.
Zone of Primary Node
You can only select an availability zone within the same region as the primary instance.
Deployment Method
-
Single-zone Deployment: The primary and standby nodes of the DuckDB analytical read-only instance are in the same availability zone.
-
Multi-zone Deployment: The primary and standby nodes of the DuckDB analytical read-only instance are in different availability zones within the same region for cross-AZ disaster recovery at no extra cost. If you select this option, you must also configure the availability zone for the standby node.
Instance Type
Dedicated and general-purpose instance types are supported. For details, see DuckDB analytical read-only instance types.
Database Proxy
Enabling the free General-purpose database proxy activates automated Hybrid Transactional/Analytical Processing (HTAP) query splitting. The proxy routes Online Analytical Processing (OLAP) queries to the DuckDB analytical read-only node and Online Transactional Processing (OLTP) queries to the primary instance or other read-only instances.
Capacity
The storage space of the analytical read-only node must be at least half the storage space of the primary instance.
-
-
Click Next: Configure Instance. Configure the network and resource group for the instance. The following table describes the key parameters.
Parameter
Description
VPC
Defaults to the Virtual Private Cloud (VPC) of the primary instance and cannot be changed.
VSwitch of Primary Node
Use the default vSwitch or select one as needed.
Resource Group
Defaults to the resource group of the primary instance and cannot be changed.
-
Click Next: Confirm Order.
-
Confirm the Parameter Configuration, select a Quantity, and click Pay Now to complete the payment.
If you chose the subscription billing method, you must also select a Duration. We recommend that you select Auto-renewal to prevent service disruptions caused by a forgotten renewal.
-
After a period of time, you can find the primary instance on the Instances page. Click the drop-down arrow to the left of the instance ID to view the DuckDB analytical read-only node under the primary instance.
Connect to the DuckDB analytical read-only node
Connect to the DuckDB analytical read-only node using one of the following methods.
(Recommended) Connect via database proxy
For workloads that combine high-concurrency Online Transactional Processing (OLTP) and complex Online Analytical Processing (OLAP), use a database proxy to enable automated HTAP query splitting. The proxy estimates each SQL query's cost and routes OLAP queries to the DuckDB analytical read-only node and OLTP queries to the primary instance or other read-only instances, eliminating application-level request routing.
-
Add a DuckDB analytical read-only node to your RDS MySQL Cluster Edition instance.
-
Enable the general-purpose database proxy for the primary instance.
-
Enable automated HTAP query splitting for the primary instance.
-
Connect to the database by using the proxy endpoint. The database proxy automatically routes requests to the most appropriate instance based on the estimated query execution cost.
Connect directly
The DuckDB analytical read-only node has a dedicated endpoint. If your workload consists entirely of OLAP queries, connect directly to the node using this endpoint.
-
Log on to the RDS console. In the navigation pane on the left, click Instances. In the top navigation bar, select a region.
-
On the Instances page, find the primary instance. Click the drop-down arrow to the left of the instance ID to view the DuckDB analytical read-only node under the primary instance.
-
Click the DuckDB analytical read-only node ID to go to its details page. In the section and click View Details to obtain the endpoint.
By default, an RDS instance provides an internal endpoint. If you need to access the instance over the internet, you must first apply for a public endpoint and then connect to the DuckDB analytical read-only node.
Change DuckDB node configuration
You can adjust the DuckDB analytical read-only node configuration at any time, including instance type (vCPUs and memory) and storage space. Go to the details page of the DuckDB analytical read-only node. On the Basic Information tab, in the Configuration Information section, click Change Configurations. For details, see Change configuration.