OpenSearch High-performance Search Edition requires that ApsaraDB RDS and PolarDB data sources reside in the same region as your OpenSearch instance. If your database is in a different region, use one of the solutions described in this topic to bridge the data into OpenSearch.
The data source instances must be under the same Alibaba Cloud account as your OpenSearch instance. The solutions in this topic also apply to self-managed MySQL databases.
Solution overview
Three solutions are available, each with different trade-offs in data freshness, complexity, and cost.
| DTS | API or SDK + DTS | MaxCompute | |
|---|---|---|---|
| Full data transfer | Supported | Supported | Supported |
| Incremental data transfer | Supported | Supported | Supported. Incremental data is transferred on a daily basis. |
| Required resources | ApsaraDB RDS, and full data migration and incremental data migration in DTS | Development and debugging of API operations or SDKs, and full data migration in DTS | MaxCompute Professional Edition (subscription), exclusive cluster resources, Cloud Enterprise Network (CEN), Resource Access Management (RAM), and region-based access control |
| Difficulty | Easy | Medium | Hard |
| Possible costs | Fees for ApsaraDB RDS and pay-as-you-go DTS instances | Fees for ApsaraDB RDS and full data migration in DTS | Fees for MaxCompute resources and exclusive clusters |
When to use each solution
DTS migration: Best for most use cases. Provides near-real-time full and incremental data synchronization with minimal setup effort.
DTS full migration + API push: Best when you need near-real-time incremental updates and have existing application logic to push changes through the OpenSearch API or SDK.
MaxCompute: Best for batch analytics workloads where daily data refresh is acceptable. Does not ensure real-time data transfer.
Before you begin
For details about the limits, configurations, and billing rules of Data Transmission Service (DTS) tasks, see the following topics:
Procedure (DTS migration)
Step 1: Create an ApsaraDB RDS or PolarDB instance in the OpenSearch region
Purchase an ApsaraDB RDS or PolarDB instance in the same region as OpenSearch.
Create a database and a database account. The account must have DDL and DML permissions.
Step 2: Create and configure a DTS task
Purchase a DTS instance. If this is your first time using DTS, activate the service first.
Select the region in which OpenSearch is activated.
Configure a data migration task. For more information, see Data Migration. > Note: When migrating data from an ApsaraDB RDS instance across regions, connect to the source instance through its public endpoint. Apply for a public endpoint in the ApsaraDB RDS console. > Note: The IP address whitelist of the source ApsaraDB RDS instance does not need additional configuration. The connectivity test passes with only
127.0.0.1in the whitelist.
Step 3: Create an OpenSearch application
After the full data migration task is complete, configure an application in the OpenSearch console.
Use the destination ApsaraDB RDS or PolarDB instance as the data source to create the application schema. For more information, see Data sources.
Real-time data transfer performance depends on both the data migration speed and the data import speed into OpenSearch. Under normal conditions, there is no significant delay. For more information about OpenSearch, see OpenSearch documentation.