A SingleStore cluster consists of the following components:
A leaf is a node that stores a subset of a cluster’s data. It functions as a storage and compute node. To optimize performance, SingleStore automatically distributes data across leaf nodes into partitions. Each leaf contains several partitions. A cluster contains many leaves and each leaf is in one of the Leaf States.
An aggregator is a node that routes queries to the leaves, aggregates intermediate results, and sends the results back to the client. There are two types of aggregators: master and child.
A master aggregator is a specialized aggregator responsible for cluster monitoring and failover. It orchestrates the basic cluster operations and all data definition language (DDL) operations. For more information, see .
A cluster contains exactly one master aggregator. A cluster may contain zero or more child aggregators (depending on the query volume).
A partition contains a subset (a shard) of data in a database. Each partition holds a vertical slice of data, which is distributed as per a hashing algorithm on the primary key or randomly for keyless sharded databases. A leaf node contains multiple partitions. When you run the CREATE DATABASE syntax, SingleStore splits the database into partitions that are distributed evenly among available leaf nodes. You can use the CREATE DATABASE syntax to add the number of partitions with the PARTITIONS=X option.
If you do not add the number of partitions explicitly, the default value is used (the number of leaf nodes x the value of the default_partitions_per_leafengine variable).
SingleStore stores data in the following types of tables:
The data can be stored in the SingleStore tables in the following ways: