What not to do when implementing Durable functions.

Durable Functions are an extension of Azure Functions that lets you write stateful functions in a serverless environment. The extension manages state, checkpoints, and restarts for you.

The extension lets you define stateful workflows using an orchestrator function, which can provide the following benefits:

  • You can define your workflows in code. No JSON schemas or designers are needed.
  • Other functions can be called both synchronously and asynchronously. Output from called functions can be saved to local variables.
  • Progress is automatically checkpointed when the function awaits. Local state is never lost when the process recycles or the VM reboots.

Durable Functions are amazing but only when implemented correctly.

Below are the things you should be avoiding when implementing durable functions:

  1. Create your activity functions to perform one independent task.
  2. Implement detailed logging inside activities and orchestrators. It’s very hard to find the current state of a request if not using logs.
  3. For a single request, always connect your logging with the task ID. It becomes easier to track the progress in application insights.
  4. Always use a dedicated storage for your function app. Do not use single storage for multiple function apps to save money.

If not implemented correctly, durable functions work very slow , however they provide high reliability in terms of processing a request but may give bad performance if not implemented correctly.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s