Justin Thanks for posting your question in Microsoft Q&A. Based on the description above, you followed the code snippet rightly as described in doc: Fan-out/fan-in scenario in Durable Functions - Cloud backup example.
When you fan out with multiple activity functions, those functions will execute on multiple VM instances concurrently, but scaling will not happen immediately, instead will follow the scaling rules. For example, premium plans follow Event-driven scaling and new instances are allocated (scaling up will take some time) faster than Consumption plan which is every 30 seconds and up to a maximum allowed by the plan. For more info, check out Understanding scaling behaviors. Hence, 200 instances might not be created like you mentioned above.
However, fan-in occurs on a single instance as described in doc: Performance Targets below. Meaning, the output from all the activity functions need to be processed by a single orchestrator on a single instance, which might cause performance issues. In such scenarios, we recommend leveraging sub-orchestrations to split it into smaller batches.
You can review App Insights to find the role instance allocation over the period of your load test timeframe (as chart) and this will help in understanding the behavior. That will also help in diagnosing the issues. For maxConcurrentActivityFunctions
, here is the default value (source: host.json Settings) and I don't think this caused the issue.
I hope this helps and let me know if you have any questions.
If you found the answer to your question helpful, please take a moment to mark it as Yes
for others to benefit from your experience. Or simply add a comment tagging me and would be happy to answer your questions.