Velu
05/21/2026, 7:09 PMRocky
05/21/2026, 7:10 PMRESTORE command pulls data from S3 to BE local disks. Performance is highly parallel across all BE nodes.
* Concurrency: Performance is tuned via download_worker_count (default is number of CPU cores) and download_buffer_size.
* Throughput: In high-concurrency scenarios, StarRocks can achieve restore speeds of ~1-2 TB per hour per node depending on S3 bandwidth and disk I/O.
* Scale: For a petabyte-scale cluster, RTO is determined by the "densest" node. If your BEs hold 10TB each, you are likely looking at 4–8 hours for a full restore. If you only restore "critical tables" first, you can achieve a "Partial RTO" of 30–60 minutes.
2. Option A: Cross-AZ Overhead at Petabyte Scale
The ~30% overhead is largely driven by cross-AZ data transfer costs and write latency (synchronous write quorum).
* Linearity of Ingest: Cross-AZ traffic for ingestion is linear. Every 1GB loaded into the Coordinator BE results in ~2GB of cross-AZ traffic (to replicate to the other 2 AZs).
* Compaction (Local): In Shared-nothing, compaction is local to each BE. Each replica performs its own compaction independently on its own local disk. Therefore, compaction does not spike cross-AZ traffic.
* Rebalancing/Repair (Spiky): This is where costs spike. If a node fails or you scale out, StarRocks will "clone" replicas across AZs to maintain replication_num=3. At PB scale, a single node failure can trigger TBs of cross-AZ movement, which is both expensive and bandwidth-intensive.
3. CCR (Cross-Cluster Replication) as a Middle Ground
CCR is often used for Disaster Recovery (DR) rather than HA, but it can serve as a middle ground:
* Mechanism: It is asynchronous replication between a primary and standby cluster.
* Cost Savings:
* Write Latency: Unlike Option A, the primary cluster doesn't wait for the remote AZ to acknowledge writes, so there is zero latency impact on ingestion.
* Compute Elasticity: You can technically run a smaller standby cluster (fewer nodes) to save costs, provided it can handle the replication stream. You only scale it up to full capacity during a failover.
* RTO: Typically minutes. Failover involves promoting the standby cluster to "primary" status (making it writable) and updating your application's connection string (or Load Balancer).
* Tradeoff: Since it's asynchronous, there is a non-zero RPO (Recovery Point Objective). You might lose a few seconds of data during an AZ outage.
Summary Table
Feature | Option A (Multi-AZ) | Option B (Restore) | CCR (Standby)
RTO | Near-Zero | Hours (4h+) | Minutes (5-10m)
RPO | 0 | 24h (or last backup) | Seconds
Cross-AZ Cost | High (Sync writes) | Low (Only on failure) | Moderate (Async writes)
Operational Effort | Low (Auto) | High (Manual/Scripted) | Moderate (Failover prep)
Recommendation: If you can tolerate a few seconds of data loss, CCR provides the best balance. It avoids the sync-write latency of Multi-AZ while keeping RTO significantly lower than a full S3 restore.
References
• administration/management/resource_management/Replica.md
• deployment/shared_data/azure.mdVelu
05/21/2026, 8:08 PMRocky
05/21/2026, 8:09 PMreplication_num=1. Always use 3 for production.
* Performance Tuning: Modify download_worker_count in be.conf to maximize S3-to-disk throughput during restoration.
* Disaster Recovery (Shared-Data/Cloud-Native): Cluster Snapshot Guide
* Note: If you move to shared-data (compute-storage separated) in v3.4.2+, StarRocks supports "Cluster Snapshots" which allow minutes-level RTO because only metadata is restored; the data remains in S3 and is immediately accessible by the new CN nodes.
* Middle Ground: Cross-cluster Data Migration Tool (Cluster Sync)
* This is the StarRocks equivalent of "CCR." It uses a tool called starrocks-cluster-sync which leverages the StarRocks Binlog (v3.0+) to asynchronously replicate data between a primary and standby cluster.
* RTO: Minutes (switching application traffic).
* RPO: Seconds (latency of the binlog stream).
* AWS HA Architecture: StarRocks AWS Quick Start
* Provides a CloudFormation/Terraform template for a Multi-AZ deployment following AWS best practices (Public/Private subnets, NAT Gateways, FE/BE distribution).
2. User Stories and Implementation Patterns
* E-Commerce & FinTech (Multi-AZ Active):
* Production users (e.g., cases documented by engineers at Tencent and Airbnb) typically deploy a 3-FE, Multi-BE cluster spread across 3 AZs.
* Insight: To mitigate the 30% cross-AZ cost, users often optimize local read affinity. While writes are cross-AZ, reads can be directed to local replicas where possible.
* Compaction: Users have found that while writes are linear, compaction is local to the BE. Therefore, background maintenance doesn't significantly add to the cross-AZ "transfer tax."
* Large Scale DR (Active-Passive with Cluster Sync):
* A common pattern for PB-scale users who cannot afford 3x storage/transfer costs is to maintain a Primary cluster in one AZ and a Standby cluster with reduced compute power in another.
* They use the starrocks-cluster-sync tool to keep the standby warm. In a disaster, they scale up the standby cluster nodes and point their BI tools to the new FE.
* Incremental Tooling:
* Third-party tools like starrocks-backup-and-restore (by Deep.BI) are used by teams to handle incremental backups to S3, reducing the daily load on the cluster compared to full snapshots.
Summary of Tradeoffs for your Scale
Strategy | Recommended Link | RTO / RPO | Scale Considerations
Multi-AZ | [Manage Replica](https://docs.starrocks.io/docs/administration/management/resource_management/Replica/) | 0 / 0 | Linear write cost; repair/balance causes spikes.
Backup/Restore | [RESTORE SQL Reference](https://docs.starrocks.io/docs/sql-reference/sql-statements/backup_restore/RESTORE/) | 4h+ / 24h | PB-scale restore is limited by S3-to-BE disk I/O.
CCR (Sync Tool) | [Migration Tooling](https://docs.starrocks.io/docs/administration/data_migration_tool/) | Mins / Secs | Best cost/performance balance for DR.Rocky
05/21/2026, 8:09 PMcluster-sync tool, giving you that "middle ground" you mentioned without the full Multi-AZ sync overhead.
References
• knowledge/usage/best-practice.md
• administration/cluster_snapshot.md
• administration/management/resource_management/Replica.md
• deployment/shared_data/azure.md
• best_practices/partitioning.md