Azure / azure-functions-durable-extension

Durable Task Framework extension for Azure Functions
MIT License
717 stars 271 forks source link

What is the Durable function "isolated" mode alternative for "extendedSessionsEnabled" ? #2905

Open Shakeebmm opened 2 months ago

Shakeebmm commented 2 months ago

I have a .NET 8 based "isolated" mode durable function which implements the fan out/fan in pattern. image

Expected F2 count is 100k activity function calls, which is getting executed in batch of 20 F2 calls. image

Delay between each batch getting increased along with the execution and function app memory also increasing consistently. image

This was resolved by enabling extendedSession in "in-proc" mode.. By enabling the extended session, 20 hours of execution was reduced to 1.5 hours. { "extensions": { "durableTask": { "extendedSessionsEnabled": true, "extendedSessionIdleTimeoutInSeconds": 30 } } }

But in "isolated" mode, extended sessions are not supported. https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-perf-and-scale#language-runtime-considerations image

What is the solution/work around in "isolated" mode?

davidmrdavid commented 2 months ago

Hi @Shakeebmm: Unfortunately, there's no direct equivalent of "extended sessions" in the isolated model yet. What's the performance difference you're seeing in the isolated mode?

Shakeebmm commented 2 months ago

Hi @davidmrdavid, There are 100k+ activity functions which are getting executed in batch of10 activities at a time.

Without extended session: gap between each batch getting increased. At the end of 100k activities, the gap is 3+ minutes. Orchestration trigger takes time to get the tracking details when the execution progress.

With extended session: Gap between each batch is consistent to couple of secs as the data is kept in session for 30 secs

davidmrdavid commented 1 month ago

Thank you @Shakeebmm. FYI @lilyjma, in case this factors in to our prioritization for next semester