Azure Function concurrency issues

Rafay Khan 20 Reputation points
2023-12-22T10:35:13.3066667+00:00

I have multiple azure functions running at the same time and creating multiple instances of each.The parameters are also passed in parallel that means at one time all the azure function urls will be hit at once.Below is an example of how I am running

Input

https://function1..azurewebsites.net/api/datagenerator/{parameter]

https://function2..azurewebsites.net/api/datagenerator/{parameter]

https://function3..azurewebsites.net/api/datagenerator/{parameter]

Paramters passed

parameter = 1

parameter = 2

Output

https://function1..azurewebsites.net/api/datagenerator/{1]

https://function1..azurewebsites.net/api/datagenerator/{2]

https://function2..azurewebsites.net/api/datagenerator/{1]

https://function2..azurewebsites.net/api/datagenerator/{2]

https://function3..azurewebsites.net/api/datagenerator/{1]

https://function3..azurewebsites.net/api/datagenerator/{2]

The execution isnt sequential its parallel.My workflow is this

Azure Functions (all running at once on multiple parameter in parallel) -> Azure Stream Analytics -> Azure SQL DB

My Stream Analytics query is simple.I have tried parallelization and also increased the streaming units.I am getting 2 issues

Issue 1 : The problem I am getting is that if I run my functions for time longer than 10 seconds I dont get all the outputs I should be getting in the database.

Issue 2: The backlog input events when run for 10 seconds is still high.I have increased streaming units by which only The CPU utilzation,SU utilization and Watermark delay have been positively affected but no the backlog input events

Azure SQL Database
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,570 questions
Azure Stream Analytics
Azure Stream Analytics
An Azure real-time analytics service designed for mission-critical workloads.
342 questions
{count} votes