Morteza Fathollahi
06/06/2026, 1:58 AMenable_transparent_data_encryption), or does it require external setup such as filesystem-level or disk-level encryption?
Additionally, what is the performance impact of enabling Encryption at Rest in StarRocks? Specifically, does it introduce any measurable overhead on query latency or throughput, and are there any known impacts on query execution performance or system-level processing under load?Rocky
06/06/2026, 1:59 AMenable_transparent_data_encryption (introduced in v3.3.1).
* This must be set to true in both fe.conf and be.conf.
* Caution: A mismatch between Frontend (FE) and Backend (BE) flags will cause the BE to abort during the heartbeat process (LOG(FATAL)).
* Key Management (KEK & KeyCache): The feature relies on a Key Encryption Key (KEK) and a KeyCache. When writing data, StarRocks (RowsetWriter/SegmentWriter) requests encryption info from the KeyCache, attaches it to the files, and persists the encryption metadata.
* External vs. Internal: While StarRocks provides this database-level TDE, you can also use external filesystem-level (e.g., eCryptfs) or disk-level (e.g., LUKS) encryption. If your compliance requirement is simply "encryption at rest," hardware/OS-level encryption is often easier to manage and has been a traditional recommendation for StarRocks before the native TDE feature matured.
3. Performance Impact
While official StarRocks-specific benchmarks for TDE overhead are not publicly detailed in the documentation, general TDE implementations typically exhibit the following characteristics:
* CPU Overhead: Enabling TDE typically introduces a measurable impact on CPU utilization, often estimated between 2% to 10% depending on the encryption algorithm (e.g., AES-128 vs AES-256) and hardware acceleration (like AES-NI).
* Ingestion (Throughput): Since every write operation involves requesting keys and encrypting data blocks before flushing to disk, you may see a slight increase in ingestion latency and a reduction in peak throughput during heavy load.
* Query Latency: Decryption occurs during the I/O read path. While modern CPUs handle AES decryption very efficiently, high-concurrency "heavy-scan" queries may experience a minor increase in latency compared to unencrypted tables.
* System Processing: The enable_transparent_data_encryption flag is not runtime-mutable. It must be configured before deployment or requires a cluster restart to take effect, meaning you should plan for performance testing during your initial setup phase.
Recommendation: For production environments with strict latency requirements, it is recommended to enable the built-in TDE on a test cluster and run a Star Schema Benchmark (SSB) or TPC-H test to measure the exact delta in your specific hardware environment. If performance is critical, ensure your CPUs support AES-NI instructions to minimize the cryptographic overhead.
References
• administration/management/BE_configuration.md
• administration/management/FE_configuration.mdMorteza Fathollahi
06/06/2026, 2:10 AMRocky
06/06/2026, 2:10 AMRowsetWriter and SegmentWriter code paths), data is encrypted before it is persisted to the storage medium.
* Local Disk (Hot Data): New segment files written to BE disks are encrypted.
* Object Storage (Cold/Tiered Data): When StarRocks moves data from local disks to object storage (S3/Azure/GCS) via storage cooling policies, the files are moved in their already-encrypted state. The encryption metadata required to decrypt them is stored alongside the rowset/segment metadata in the StarRocks FE/BE, ensuring seamless access regardless of where the file resides.
* Shared-Data (Cloud-Native): TDE also explicitly supports "Lake SSTs" and "Persistent Index" files used in storage-compute separation.
2. Recommended Approach & Built-in Configuration
The recommended approach is to use the built-in TDE feature, but with a clear understanding of its setup requirements:
* Primary Configuration: Set enable_transparent_data_encryption = true in both fe.conf and be.conf.
* Critical Requirement: The encryption flags between FE and BE must match. If there is a mismatch (e.g., FE is true but BE is false), the BE will fail to start or will be aborted during the heartbeat process (LOG(FATAL)).
* Key Management: StarRocks uses an internal Key Encryption Key (KEK) and KeyCache system. You must ensure that the key management environment is properly initialized before enabling the feature. Unlike cloud-native managed services, this is a database-level implementation.
* Supplementary Layer: For data on object storage, it is still considered a "best practice" to enable Server-Side Encryption (SSE) on the S3 bucket itself (e.g., SSE-S3 or SSE-KMS). This provides "defense in depth" (encryption at both the database level and the storage provider level).
3. Known Limitations and Caveats
* Newly Written Data Only: TDE only encrypts data written after the feature is enabled. It does not retroactively encrypt existing data on disk or object storage. To encrypt old data, you would need to perform an INSERT INTO ... SELECT * into a new table or wait for background compactions to eventually rewrite the segments (though the latter is less predictable).
* Not Runtime-Mutable: You cannot toggle this feature on and off without a cluster restart.
* Object Storage Permissions: Ensure your BE/CN nodes have the necessary IAM roles or credentials to handle encrypted objects if you are using supplementary S3-side KMS encryption.
4. Performance Impact
While specific overhead varies by hardware, the performance impact generally falls into these categories:
* CPU Utilization: Expect a 5%–10% increase in CPU usage during high-throughput ingestion and heavy-scan queries. StarRocks utilizes AES encryption; if your hardware supports AES-NI (Advanced Encryption Standard New Instructions), this overhead is significantly minimized.
* Query Latency: Because decryption occurs during the I/O read path, queries involving massive scans of "cold" data from object storage may see a minor latency increase. However, since the network I/O from object storage is often the primary bottleneck, the cryptographic overhead is frequently negligible in comparison.
* Throughput: Under extreme load, peak ingestion throughput may decrease slightly due to the additional computational steps required to request keys and encrypt data blocks before flushing them being flushed to the filesystem.Rocky
06/06/2026, 2:10 AMfe.conf and be.conf, but verify your CPU supports AES-NI to keep performance overhead low. For maximum security, combine this with S3 SSE-KMS for the object storage tier.
References
• administration/management/BE_configuration.md
• administration/user_privs/ssl_authentication.md
• data_source/catalog/iceberg/iceberg_catalog.md
• using_starrocks/caching/block_cache.md
• using_starrocks/caching/query_cache.md