Azure Durable function cost of sleeping

Ana 141 Reputation points
2021-02-24T12:17:02.053+00:00

If I use PowerShell Start-Sleep 700 in a durable function is it an equivalent of await and won't be charged or will it?

From documentation:
When an orchestrator function waits for an asynchronous action to finish by using await in C# or yield in JavaScript, the runtime considers that particular execution to be finished.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,379 questions
{count} votes

Accepted answer
  1. ChaitanyaNaykodi-MSFT 23,426 Reputation points Microsoft Employee
    2021-02-26T03:11:59.24+00:00

    Hello @Ana , I got a response back from the team, below are the obtained details.

    1. For PowerShell durable function apps invoking an activity function without NoWait is equivalent to invoking it with await in C# and other languages: the orchestrator invocation stops and billing stops. Please refer to this document for additional details and implementation.
    2. If you are planning to use Start-Sleep it is recommended to use durable timer instead, for PowerShell please refer to this example for implementation. (see the Start-DurableTimer call)
    3. For using Start-Sleep 700 which is equivalent 700,000 milliseconds, you will be charged according to this pricing guide for Function Apps.

    Please let me know if there are any additional concerns. Thank you!

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful