Skip to main content
Both architectures use FE nodes to accept client connections, manage metadata, and coordinate SQL queries. Clients connect to an FE using the MySQL protocol. Choose an architecture based on where persistent table data should reside and how compute and storage need to scale.

Architecture choices

Shared-nothing

A shared-nothing cluster uses FEs and BEs. BEs execute query tasks assigned by the FE and persist table data to their local disks. Queries can scan data locally on the BEs that store it. Adding or removing BEs can redistribute replicas across nodes. Shared-nothing architecture. Clients connect to FEs, which coordinate queries. BEs run queries and persist table data on their local disks.

Nodes

In the shared-nothing architecture, the database consists of two types of nodes: FEs and BEs.
  • FEs are responsible for metadata management and constructing execution plans.
  • BEs execute query plans and store data. BEs utilize local storage to accelerate queries and the multi-replica mechanism to ensure high data availability.
FE
FEs are responsible for metadata management, client connection management, query planning, and query scheduling. Each FE uses BDB JE (Berkeley DB Java Edition) to store and maintain a complete copy of the metadata in its memory, ensuring consistent services across all FEs. FEs can work as the leader, followers, and observers. If the leader node crashes, with followers electing a leader through the replication and election mechanism of BDB JE.
BE
BEs are responsible for data storage and SQL execution.
  • Data storage: BEs have equivalent data storage capabilities. FEs distribute data to BEs based on predefined rules. BEs transform the ingested data, write the data into the required format, and generate indexes for the data.
  • SQL execution: FEs build and distribute query plans. BEs execute their assigned tasks, scan local data where possible, and exchange intermediate results with other nodes as needed.

Shared-data

A shared-data cluster uses FEs and CNs, with persistent table data in shared object storage or HDFS. CNs run queries and cache hot data. Add or remove CNs to change compute capacity while persistent data stays in shared storage. CNs that take over queries may need to cache the data again. The FE setting lake_enable_balance_tablets_between_workers controls tablet balancing onto new CNs. It is enabled by default from v3.5.6 and v4.0 onwards. Shared-data architecture. Clients connect to FEs. CNs run queries and cache hot data. Persistent data resides in shared object storage or HDFS.

Nodes

FEs in the shared-data architecture provide the same functions as in the shared-nothing architecture. BEs are replaced with CNs (Compute Nodes), and the storage function is offloaded to object storage or HDFS. CNs are stateless compute nodes that perform all the functions of BEs, except for the storage of data.

Storage

The database shared-data clusters support two storage solutions: object storage (for example, AWS S3, Google GCS, Azure Blob Storage, or MinIO) and HDFS. In a shared-data cluster, the data file format remains consistent with that of a shared-nothing cluster (featuring coupled storage and compute). Data is organized into segment files, and various indexing technologies are reused in cloud-native tables, which are tables used specifically in shared-data clusters.

Cache

CNs can read hot data from memory or their local disk caches. On a cache miss, they read the required data from shared storage and cache it according to the cache settings. New or replacement CNs may need more remote reads while their caches warm up, which can increase query latency. You can configure caching when you create a table. When write caching is enabled, a copy of the data can be cached on local disk. Shared storage holds the persistent data.

Feature Differences between Shared-nothing and Shared-data Clusters

This section lists the differences of features supported in shared-nothing and shared-data clusters.

Real-time Analytics and Primary Key Tables

Storage Engine

Data Distribution

Query Performance

Data Protection

Security and Authentication



Learn by doing

Try the Quick Starts to get an overview of using the database with realistic scenarios.