Activity parameters and returns values impact on performance

With reference to performance co-relation with activity parameters and return values mentioned below.

We are planning to use the iterator workflow pattern as mentioned by maxim in the thread. However, this pattern leads to an increase in the size of results and values being passed between activities.

So, I have the following queries on the same:

  1. Is there any recommendation on the upper cap of data to be passed between activities?
  2. How does temporal stores these values in the workflow execution history? Is there any multiplier impact here in co-relation to the number of attempts made for an activity?

Temporal does record activity inputs and outputs in the workflow history. Only the last result is stored in the history. Activity retries are not recorded in the history.

The hard cap on the activity size is 2MB. But it is for outliers as the whole history size cap is 50MB. We recommend keeping average activity inputs and outputs within a few dozen kilobytes.

The possible solutions for the large activity inputs and outputs:

  • Store results in a blob store like S3 and pass the reference as an activity result.
  • Store results in process and route next activity to the same process.
1 Like

Thanks, this helps.