Skip to content

feat: add transparent zstd compression for history_node data blobs#10318

Draft
mykaul wants to merge 1 commit into
temporalio:mainfrom
mykaul:feature/history-node-compression
Draft

feat: add transparent zstd compression for history_node data blobs#10318
mykaul wants to merge 1 commit into
temporalio:mainfrom
mykaul:feature/history-node-compression

Conversation

@mykaul
Copy link
Copy Markdown
Contributor

@mykaul mykaul commented May 18, 2026

Add optional zstd compression for large history_node table data blobs to reduce storage and network costs.

Key design decisions:

  • Disabled by default (threshold=0) for safe rolling upgrades
  • Minimum compression floor of 1024 bytes (zstd framing overhead)
  • Skips compression if result is larger than original
  • Encoding marker Proto3+zstd stored in data_encoding column
  • Transparent decompression on read via NewDataBlob()
  • 16MB decoder memory limit to prevent memory bombs
  • TransactionSizeLimit uses compressed size; response Size uses logical size

New dynamic config: system.historyNodeBlobCompressionThreshold
Enable only after all nodes are upgraded to a version that can read compressed blobs.

Fixes: #10307

Add optional zstd compression for large history_node table data blobs
to reduce storage and network costs.

Key design decisions:
- Disabled by default (threshold=0) for safe rolling upgrades
- Minimum compression floor of 1024 bytes (zstd framing overhead)
- Skips compression if result is larger than original
- Encoding marker "Proto3+zstd" stored in data_encoding column
- Transparent decompression on read via NewDataBlob()
- 16MB decoder memory limit to prevent memory bombs
- TransactionSizeLimit uses compressed size; response Size uses logical size

New dynamic config: system.historyNodeBlobCompressionThreshold
Enable only after all nodes are upgraded to a version that can read
compressed blobs.

Fixes: temporalio#10307
@mykaul mykaul force-pushed the feature/history-node-compression branch from 3808a5d to d0890a6 Compare May 18, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compress history_node->data cell

1 participant