0

My function app is Isolated mode B1

It contains http and queue triggered functions

The app only processes one request at a time and others wait for the previous to finish. This includes http requests made in parallel and queue triggers when the queues are all full.

I see that I can scale my app out to 2 instances, but is this really required to handle simultaneous requests?

Example Http function that takes 60 seconds to handle two concurrent calls:

 [Function("TestConcurrency")]
 public HttpResponseData Concurrency([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post")] HttpRequestData req)
 {
     var response = req.CreateResponse(HttpStatusCode.OK);
     response.WriteString("Concurrency");
     response.WriteString(DateTime.Now.ToString());
     Thread.Sleep(30 * 1000);
     response.WriteString(DateTime.Now.ToString());
     return response;
 }

1 Answer 1

0

I was looking for app setting FUNCTIONS_WORKER_PROCESS_COUNT which has default 1

Async-await also frees up threads but starting with only 1 was my main problem

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.