blob: a944a85b27d790aed5e5d3b3e9e215281af03c39 [file] [log] [blame]
(window.webpackJsonp=window.webpackJsonp||[]).push([[39],{436:function(t,e,a){"use strict";a.r(e);var i=a(29),o=Object(i.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h2",{attrs:{id:"basic-concepts-of-iotdb-cluster"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#basic-concepts-of-iotdb-cluster"}},[t._v("#")]),t._v(" Basic Concepts of IoTDB Cluster")]),t._v(" "),e("p",[t._v("Apache IoTDB Cluster contains two types of nodes: ConfigNode and DataNode, each is a process that could be deployed independently.")]),t._v(" "),e("p",[t._v("A illustrate of the cluster architecture:")]),t._v(" "),e("img",{staticStyle:{width:"100%","max-width":"500px","max-height":"400px","margin-left":"auto","margin-right":"auto",display:"block"},attrs:{src:"https://github.com/apache/iotdb-bin-resources/blob/main/docs/UserGuide/Cluster/Architecture.png?raw=true"}}),t._v(" "),e("p",[t._v("ConfigNode is the control node of the cluster, which manage the node status of cluster, partition information, etc. All ConfigNodes in the cluster form a high available group, which is fully replicated.")]),t._v(" "),e("p",[t._v("DataNode stores the data and schema of cluster, which manage multiple data regions and schema regions. Data is the time-value pair, and schema is the path and data type of each timeseries.")]),t._v(" "),e("p",[t._v("Client could only connect to the DataNode for operation.")]),t._v(" "),e("h2",{attrs:{id:"characteristics-of-cluster"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#characteristics-of-cluster"}},[t._v("#")]),t._v(" Characteristics of Cluster")]),t._v(" "),e("ul",[e("li",[t._v("Native Cluster Architecture\n"),e("ul",[e("li",[t._v("All modules are designed for cluster.")]),t._v(" "),e("li",[t._v("Standalone is a special form of Cluster.")])])]),t._v(" "),e("li",[t._v("High Scalability\n"),e("ul",[e("li",[t._v("Support add nodes in a few seconds without data migration.")])])]),t._v(" "),e("li",[t._v("Massive Parallel Processing Architecture\n"),e("ul",[e("li",[t._v("Adopt the MPP architecture and volcano module for data processing, which has high extensibility.")])])]),t._v(" "),e("li",[t._v("Configurable Consensus Protocol\n"),e("ul",[e("li",[t._v("We could adopt different consensus protocol for data replicas and schema replicas.")])])]),t._v(" "),e("li",[t._v("Extensible Partition Strategy\n"),e("ul",[e("li",[t._v("The cluster adopts the lookup table for data and schema partitions, which is flexible to extend.")])])]),t._v(" "),e("li",[t._v("Built-in Metric Framework\n"),e("ul",[e("li",[t._v("Monitor the status of each node in cluster.")])])])]),t._v(" "),e("h2",{attrs:{id:"partitioning-strategy"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#partitioning-strategy"}},[t._v("#")]),t._v(" Partitioning Strategy")]),t._v(" "),e("p",[t._v("The partitioning strategy partitions data and schema into different Regions, and allocates Regions to different DataNodes.")]),t._v(" "),e("p",[t._v("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.")]),t._v(" "),e("p",[t._v("The storage group contains multiple SchemaRegions (schema shards) and DataRegions (data shards), which are managed by DataNodes.")]),t._v(" "),e("ul",[e("li",[t._v("Schema partition strategy\n"),e("ul",[e("li",[t._v("For a time series schema, the ConfigNode maps the device ID (full path from root to the penultimate tier node) into a series_partition_slot and assigns this partition slot to a SchemaRegion group.")])])]),t._v(" "),e("li",[t._v("Data partition strategy\n"),e("ul",[e("li",[t._v("For a time series data point, the ConfigNode will map to a series_partition_slot (vertical partition) according to the device ID, and then map it to a time_partition_slot (horizontal partition) according to the data timestamp, and allocate this data partition to a DataRegion group.")])])])]),t._v(" "),e("p",[t._v("IoTDB uses a slot-based partitioning strategy, so the size of the partition information is controllable and does not grow infinitely with time series or the number of devices.")]),t._v(" "),e("p",[t._v("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.")]),t._v(" "),e("h2",{attrs:{id:"replication-strategy"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#replication-strategy"}},[t._v("#")]),t._v(" Replication Strategy")]),t._v(" "),e("p",[t._v("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.")]),t._v(" "),e("p",[t._v("A region is the basic unit of replication. Multiple replicas of a region construct a high-availability replication group, to support high availability.")]),t._v(" "),e("ul",[e("li",[t._v("Replication and consensus\n"),e("ul",[e("li",[t._v("Partition information: The cluster has 1 partition information group consisting of all ConfigNodes.")]),t._v(" "),e("li",[t._v("Data: The cluster has multiple DataRegion groups, and each DataRegion group has multiple DataRegions with the same id.")]),t._v(" "),e("li",[t._v("Schema: The cluster has multiple SchemaRegion groups, and each SchemaRegion group has multiple SchemaRegions with the same id.")])])])]),t._v(" "),e("p",[t._v("A illustration of the partition allocation in cluster:")]),t._v(" "),e("img",{staticStyle:{width:"100%","max-width":"500px","max-height":"500px","margin-left":"auto","margin-right":"auto",display:"block"},attrs:{src:"https://github.com/apache/iotdb-bin-resources/blob/main/docs/UserGuide/Cluster/Data-Partition.png?raw=true"}}),t._v(" "),e("p",[t._v("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.")]),t._v(" "),e("p",[t._v("The figure contains 3 DataRegion groups, and the data_replication_factor is 3, so there are 9 DataRegions in total.")]),t._v(" "),e("h2",{attrs:{id:"consensus-protocol-consistency-protocol"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#consensus-protocol-consistency-protocol"}},[t._v("#")]),t._v(" Consensus Protocol (Consistency Protocol)")]),t._v(" "),e("p",[t._v("Among multiple replicas of each region group, data consistency is guaranteed through a consensus protocol, which routes read and write requests to multiple replicas.")]),t._v(" "),e("ul",[e("li",[t._v("Current supported consensus protocol\n"),e("ul",[e("li",[t._v("Standalone:Could only be used when replica is 1, which is the empty implementation of the consensus protocol.")]),t._v(" "),e("li",[t._v("MultiLeader:Could be used in any number of replicas, only for DataRegion, writes can be applied on each replica and replicated asynchronously to other replicas.")]),t._v(" "),e("li",[t._v("Ratis:Raft consensus protocol, Could be used in any number of replicas, could be used for any region groups。")])])])]),t._v(" "),e("h2",{attrs:{id:"_0-14-0-preview1-function-map"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_0-14-0-preview1-function-map"}},[t._v("#")]),t._v(" 0.14.0-preview1 Function Map")]),t._v(" "),e("img",{staticStyle:{width:"100%","max-width":"800px","max-height":"1000px","margin-left":"auto","margin-right":"auto",display:"block"},attrs:{src:"https://github.com/apache/iotdb-bin-resources/blob/main/docs/UserGuide/Cluster/Preview1-Function.png?raw=true"}})])}),[],!1,null,null,null);e.default=o.exports}}]);