Three Different Deployment Forms of Apache IoTDB

Currently, Apache IoTDB supports three deployment forms—standalone deployment, cluster deployment, and dual-active deployment. This article will reveal their highlights and drawbacks compared to each other, the applicable scenarios, and how to deploy them, helping each user make the most appropriate decision.

Characteristics of the Deployment Forms

Standalone Deployment

Standalone deployment, as the name suggests, involves deploying the IoTDB database on a single server, with all data written to a single instance.

Strengths and Trade-offs:

  • Strengths: Easy for developers to install and deploy, with lower deployment and maintenance costs, and simple operation.

  • Trade-offs: Lacks high availability and has a risk of single point of failure. It only supports vertical scaling, meaning the system's capacity can be expanded by adding more CPU, memory, and storage to a single node.

Applicable Scenarios: Suitable for development of testing environments, small-scale applications with low data volume and traffic, such as edge servers.

Deployment: Install and deploy using an installation package on a single server. For more details, please refer to the user manual: Standalone Deployment.

Cluster Deployment

Cluster Deployment.jpg

Cluster Deployment Diagram

Cluster deployment refers to splitting a single database into multiple nodes that are deployed across several servers, where each node in the cluster has equal status and jointly provides services externally. If some nodes fail, the remaining nodes can still provide services, ensuring the high availability of the database. The significance of cluster deployment lies in enhancing the performance, scalability, and availability of the database.

Strengths and Trade-offs:

  • Strengths: High availability, high scalability. When expansion is needed, new nodes can be added and the same services can be deployed on them, reducing the pressure on servers from data growth. Load balancing significantly improves performance.

  • Trade-offs: Complex deployment and maintenance, high cost, and high requirements for network.

Applicable Scenarios: Suitable for enterprise-level applications involving large-scale data processing and high-concurrency access, such as IoT (Internet of Things), industrial internet, and other scenarios where large volumes of time-series data need to be processed while ensuring system availability and reliability.

Deployment Method:

Prepare multiple servers, clearly define roles, and start the database on each machine in sequence (When using TimechoDB, license is required). For more details, please refer to the user manual: Cluster Deployment.

Dual Active Deployment

Dual-active deployment.jpg

Dual-Active Deployment Diagram

Dual-active deployment is a feature of the TimechoDB. It refers to two independent standalone (or cluster) instances that are both active and can provide services simultaneously. The two instances perform real-time mirroring synchronization, with completely independent configurations. They can both receive external write requests, and data written to one instance is synchronized to the other in real time. The two sets of data on each instance are eventually consistent with each other.

The two instances forms a high-availability group—if one instance fails, the other will not be affected. When the failed instance restarts, the other instance will synchronize the newly written data. The application can bind to both servers for read and write operations, thereby achieving high availability.

Strengths and Trade-offs::

  • Strengths: Achieves high availability and disaster tolerance, with the ability to quickly switch over in case of failure while ensuring data synchronization.

  • Trade-offs: Implementation is more complex, with higher maintenance costs and limited impact on performance improvement.

Applicable Scenarios: Suitable for scenarios that require building a high-availability environment using two nodes and for disaster recovery deployments involving power, network, and other critical infrastructures.

Deployment Method:

Deploy standalone (or cluster) instances separately, create and start pipes to ensure that data streams can synchronize between them. Please note that the dual-active deployment is only available in TimechoDB, our enterprise-grade offering based on Apache IoTDB. For more details, please refer to the user manual: Dual-Active Deployment.

Summary

The characteristics of the three deployment modes are compared below. In practical applications, users often prioritize specific requirements such as reliability, scalability, or high performance, but it is challenging to achieve optimal results in all areas simultaneously. Therefore, it is recommended that users make trade-offs based on their business needs and application scenarios.

deployments in comparison.png

For any questions or free trials of TimechoDB, please feel free to reach out to us (contact@timecho.com)