Dual-active mode refers to two independent instances (either standalone or clusters) with completely independent configurations. These instances can simultaneously handle external read and write operations, with real-time bi-directional synchronization and breakpoint recovery capabilities.
Key features include:
Note: The dual-active functionality is exclusively available in enterprise-grade TimechoDB.
192.168.1.3 and the hostname is iotdb-1, configure it in /etc/hosts using:echo "192.168.1.3 iotdb-1" >> /etc/hosts
Use the hostname to configure IoTDB’s cn_internal_address and dn_internal_address.
Immutable Parameters: Some parameters cannot be changed after the initial startup. Follow the steps in the “Installation Steps” section to configure them correctly.
Monitoring Panel: Deploying a monitoring panel is recommended to monitor key performance indicators and stay informed about the database’s operational status. Contact the Timecho team to obtain the monitoring panel and refer to the corresponding Monitoring Panel Deployment for deployment steps.
This guide uses two standalone nodes, A and B, to deploy the dual-active version of TimechoDB. The IP addresses and hostnames for the nodes are as follows:
| Machine | IP Address | Hostname |
|---|---|---|
| A | 192.168.1.3 | iotdb-1 |
| B | 192.168.1.4 | iotdb-2 |
Install TimechoDB on both machines (A and B) independently. For detailed instructions, refer to the standalone Stand-Alone Deploymentor cluster Cluster Deploymentdeployment guides.
Ensure that configurations for A and B are consistent for optimal dual-active performance.
sbin directory:./sbin/start-cli.sh -h iotdb-1
create pipe AB with source ( 'source.mode.double-living' ='true' with sink ( 'sink'='iotdb-thrift-sink', 'sink.ip'='iotdb-2', 'sink.port'='6667' )
source.mode.double-living is set to true on both A and B. This prevents retransmission of data received through the other instance's pipe../sbin/start-cli.sh -h iotdb-2
create pipe BA with source ( 'source.mode.double-living' ='true' ) with sink ( 'sink'='iotdb-thrift-sink', 'sink.ip'='iotdb-1', 'sink.port'='6667' )
source.mode.double-living is set to true on both A and B. This prevents retransmission of data received through the other instance's pipe.Run the show cluster command on both nodes to verify the status of the TimechoDB services:
show cluster
Machine A:
Machine B:
Ensure all ConfigNode and DataNode processes are in the Running state.
Use the show pipes command on both nodes:
show pipes
Confirm that all pipes are in the RUNNING state:
On machine A:
On machine B:
To stop the dual-active instances:
On machine A:
./sbin/start-cli.sh -h iotdb-1 # Log in to CLI IoTDB> stop pipe AB # Stop data synchronization ./sbin/stop-standalone.sh # Stop database service
On machine B:
./sbin/start-cli.sh -h iotdb-2 # Log in to CLI IoTDB> stop pipe BA # Stop data synchronization ./sbin/stop-standalone.sh # Stop database service