kumar
kumar

Reputation: 9387

What state is maintained in Azure Durable functions?

When going through Azure Durable function they mention that we can write stateful functions. What is meant by stateful and what state is maintained? Are we talking about running state of a function?

Upvotes: 1

Views: 486

Answers (1)

Lajos Arpad
Lajos Arpad

Reputation: 76601

A stateful function is a function which has a state, that is, some data is asscociated to the function. In our specific case, we are talking about:

  • managing state of the workflow (at what step we are)
  • create progress checkpoints (when a checkpoint is reached, the state is changed)
  • persisting execution history
  • scheduling activity

From the docs:

Durable Functions is an extension to the Azure Functions runtime that enables the definition of stateful workflows in code. By breaking down workflows into activities, the Durable Functions extension can manage state, create progress checkpoints, and handle the distribution of function calls across servers. In the background, it makes use of an Azure Storage account to persist execution history, schedule activity functions and retrieve responses. Your serverless code should never interact with persisted information in that storage account, and is typically not something with which developers need to interact.

Upvotes: 2

Related Questions