Answer the question
In order to leave comments, you need to log in
Where to look for the reason for the Python function scalability limit in Azure Functions?
There is a Python code that works with the OpenCV library. I decided to try hosting it on Azure Functions in order to be able to run calculations in parallel.
I uploaded the code to Function App (Consumption plan/Free trial subscription) and made several test runs of 2,4,8,16 calls at the same time.
The function code is executed (judging by the logs) ~15 seconds, the results of the launches were as follows:
2 requests - ~30 seconds.
4 requests - ~32 sec.
8 requests - ~35 sec.
16 requests - ~60 sec.
Here is an excerpt from the logs of one of the launches (the start of the function and the execution of the first command are separated by 50 seconds):
2020-08-28 08:05:48.335 Executing 'Functions.FuncName' (Reason='This function was programmatically called via the host APIs.', Id=6ce3ec9b-6b32-4ec1-80e8-533124fa28bd)
2020-08-28 08:06:37.698 Python HTTP trigger function processed a request.
async def main(req: func.HttpRequest) -> func.HttpResponse:
return func.HttpResponse(await do_work(req))
Answer the question
In order to leave comments, you need to log in
Actually questions:
Why does running more than 8 functions in parallel start to delay execution?
Why does the parallel launch of 2 functions take about the same time as the sequential one?you don’t remember how a thread is created and resources are allocated,
and running more than 8 functions starts to delay
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question