How to properly control persistence db size?


Besides setting better namespace retention time, I wanna know what is happening behind scene to make sure the size of persistence db is not constantly growing? Is there any extra parameters or steps you guys recommend to do to make sure db doesnt run out of space?

1 Like

Hey @Steven_Sun,
There are 3 main areas DB is used.

  1. Workflow State: This is represented as mutable state and history events. This state is kept in the store until retention after the workflow is closed.
  2. Visibility: These are the records we write to database to drive all visibility queries. They are also kept until retention after the workflow is closed.
  3. Tasks: Workflow and Activity tasks. They are kept in the system until worker connect and these tasks are dispatched. In the case when worker never connects they are protected by TTL until workflow timeout or activity timeout.

So if you are using decent workflow retention setting then I don’t expect it DB size to keep on increasing.
I highly recommend to have alerts created on DB sizes and watch that closely.

1 Like