Skip to main content

Large payload storage - TypeScript SDK

This feature is in development

Large payload storage support is not yet available in the TypeScript SDK. This page will be updated when the feature is released. See the Python SDK for a working implementation.

The Temporal Service enforces a ~2 MB per payload limit. When your Workflows or Activities handle data larger than this, you can offload payloads to external storage (such as S3) and pass a small reference token through the event history instead. This is sometimes called the claim check pattern.

External storage sits at the end of the data pipeline, after both the Payload Converter and the Payload Codec:

User code → PayloadConverter → PayloadCodec → External Storage → Temporal Service

When a payload exceeds a configurable size threshold (default 256 KiB), the storage driver uploads it to your external store and replaces it with a lightweight reference. Payloads below the threshold stay inline in the event history. On the way back, reference payloads are retrieved from external storage before the codec decodes them.

Because external storage runs after the codec, payloads are already encrypted (if you use an encryption codec) before they're uploaded to your store.

Store and retrieve large payloads using external storage

This section will document how to implement a storage driver and configure external storage on the TypeScript DataConverter once the feature ships.

Implement a storage driver

Stub: storage driver interface and example.

Store payloads

Stub: store method implementation.

Retrieve payloads

Stub: retrieve method implementation.

Configure external storage on the Data Converter

Stub: DataConverter configuration.

Adjust the size threshold

Stub: payload_size_threshold configuration.

Use multiple storage drivers

Stub: driver_selector configuration.