Apache IoTDB Cluster contains two types of nodes: ConfigNode and DataNode, each is a process that could be deployed independently.
An illustration of the cluster architecture:
ConfigNode is the control node of the cluster, which manages the node status of cluster, partition information, etc. All ConfigNodes in the cluster form a highly available group, which is fully replicated.
DataNode stores the data and schema of cluster, which manages multiple data regions and schema regions. Data is a time-value pair, and schema is the path and data type of each time series.
Client could only connect to the DataNode for operation.
The partitioning strategy partitions data and schema into different Regions, and allocates Regions to different DataNodes.
It is recommended to set 1 storage group (there is no need to set the storage group according to the number of cores as in version 0.13), which is used as the database concept, and the cluster will dynamically allocate resources according to the number of nodes and cores.
The storage group contains multiple SchemaRegions (schema shards) and DataRegions (data shards), which are managed by DataNodes.
IoTDB uses a slot-based partitioning strategy, so the size of the partition information is controllable and does not grow infinitely with the number of time series or devices.
Multiple replicas of a Region will be allocated to different DataNodes to avoid single point of failure, and the load balance of different DataNodes will be ensured when Regions are allocated.
The replication strategy replicates data in multiple replicas, which are copies of each other. Multiple copies can provide high-availability services together and tolerate the failure of some copies.
A region is the basic unit of replication. Multiple replicas of a region construct a high-availability replication group, to support high availability.
An illustration of the partition allocation in cluster:
The figure contains 1 SchemaRegion group, and the schema_replication_factor is 3, so the 3 white SchemaRegion-0s form a replication group, and the Raft protocol is used to ensure data consistency.
The figure contains 3 DataRegion groups, and the data_replication_factor is 3, so there are 9 DataRegions in total.
Among multiple replicas of each region group, data consistency is guaranteed through a consensus protocol, which routes read and write requests to multiple replicas.