Workflows State Reliability

If I have a workflow function, and one of my variables in the function is the output of an activity, my understanding is that that variable’s value should be recovered in the case of an outage, the worker going down, or the temporal server going down, correct?

How does Temporal ensure that, is this state stored in a DB somewhere or?

Temporal stores activity result in the workflow history log.
When your worker process crashes a new worker can replay the history to recreate the same workflow program state.
This is why workflow code must be deterministic.

Just to add, would also watch this video (time set to part thats relevant)

Appreciate the answers! I think the link doesn’t include a timestamp though

Sorry, here