-1

I can execute a process "x" in parallel using Azure Functions Durable Fan In/Fan Out.

enter image description here

If I divide my unique process "x" in multiple process using this concept, can I reduce the execution time for the function?

ricxk
  • 67
  • 1
  • 10
  • It's impossible for anyone to give you a definitive answer to this question. It may. It may not. The best way to find out is to try it. – Daniel Mann Aug 01 '22 at 18:39
  • Currently I am executing all queries to get and update together, it does the queries wait for previous query (turning slow the execution). In this idea I'll try to execute as parallel task (queries will be executed parallel). I am just asking, because I am not sure if its possible with az functions. – ricxk Aug 01 '22 at 18:45

2 Answers2

0

In general Azure Functions Premium allow for higher timeout values. So, if you don't want to deal with the issue, just upgrade ;-)

Azure Durable Functions might or might not reduce your total runtime. BUT every "Activity Call" is a new function execution with an own timeout.

Either Fanning out or even calling activities it in serial will prevent timeout issue as long the called activity will not extend the timeout period for functions.

If, however you have an activity which will run for an extended period, you will need premium functions anyway. But your solution with "batch" processing looks quite promising to avoid this.

0

Making use of the fan-out/fan-in approach, you will run tasks in parallel instead of sequentially so the duration of the execution will be the duration of your longest single task to execute. It's the best approach to use if the requests do not require information from each other to process.

You could make use of Task Asynchronous Programming (TAP) to build tasks, call relevant methods and wait for all tasks to finish if you don't want them to be on Durable Functions

Tagz97
  • 87
  • 5