In StarRocks, the choice between
Shared-Nothing and
Shared-Data architectures refers to how the StarRocks cluster itself is managed. When querying
Iceberg tables on S3, both architectures act as a compute engine for that external data, but they differ in how they handle scaling and local caching.
1. Shared-Nothing Cluster (Traditional BEs)
*
Architecture: Data for
internal StarRocks tables is sharded and stored on the local disks of Backend (BE) nodes.
*
Iceberg on S3: When you query Iceberg, the BEs fetch data from S3.
*
Caching: You can enable the
Data Cache feature. The BEs will store fragments of the Iceberg data on their local SSDs/HDDs to speed up subsequent queries.
*
Scaling: To increase compute power for Iceberg queries, you add more BEs. However, because BEs also manage internal data shards, scaling them often triggers a "data rebalance" for your internal tables, which can be resource-intensive.
*
Best for: Use cases where you have a mix of high-performance internal tables and external Iceberg tables, and your cluster size is relatively stable.
2. Shared-Data Cluster (Cloud-Native CNs)
*
Architecture: Internal StarRocks tables are stored directly on S3 (or other object storage). Compute Nodes (CNs) are stateless and do not "own" data shards.
*
Iceberg on S3: CN nodes fetch Iceberg data from S3 just like BEs do.
*
Caching: CN nodes use their local disk space primarily as a
hot data cache. This cache works for both StarRocks' own "cloud-native" tables and external Iceberg tables.
*
Scaling: This is the biggest advantage. Since CNs are stateless, you can scale them up or down in seconds to handle spikes in Iceberg query workloads without any data rebalancing.
*
Best for: Purely cloud-based environments where you want
elasticity. If your Iceberg query volume fluctuates, a Shared-Data cluster allows you to pay for compute only when needed.
Key Differences for Iceberg Workloads
Feature |
Shared-Nothing (BE) |
Shared-Data (CN)
Data Location | Iceberg stays on S3 | Iceberg stays on S3
Compute Node | Backend (BE) | Compute Node (CN)
Elasticity | Slower (requires rebalance for internal data) | Highly Elastic (stateless scaling)
Data Cache | Supported (manually configured) | Supported (built-in/central to design)
Storage Cost | High (for internal tables on local disks) | Low (all persistent data on S3)
Recommendation
* If you are querying
Iceberg on S3 and want a "Presto/Trino-like" experience with much better performance (via StarRocks' C++ execution engine and Data Cache), the
Shared-Data (CN) architecture is generally preferred. It matches the "S3-native" nature of Iceberg.
* If you already have a large StarRocks cluster with a lot of local data and just want to query Iceberg occasionally, staying with
Shared-Nothing is fine, provided you enable the
Data Cache to avoid repeated S3 scan costs.
References
•
deployment/shared_data/feature-support-shared-data.md
•
introduction/Architecture.md
•
deployment/shared_data/s3.md
•
deployment/shared_data/hdfs.md