Series 2 : Concurrency experiment in A1 v2 (1 vcpu, 2 GiB memory) Virtual machine

Series - Concurrency vs Parallelism

This blog is a continuation of the previous Concurrency series blog . In the previous blog we have deployed our application on Azure Function and found that the assumption of 1vCPU : 1Core is wrong. Hence in this blog we will experiment the same process of 100 concurrent requests over A1 Series VM that have 1 core.

  • Create Windows data center virtual machine, with size A1 v2 (1 vcpu, 2 GiB memory)
  • Add IIS feature to it using the Server manager

  • Install .NET 6 hosting module for IIS ( this steps depends on which runtime your application is running)

  • Create a new website in the IIS and publish the contents to it


  • From above visualization it is evident that processor was able to quickly switch to a different context and execute the second request and so on even if it is a single core processor.
  • Now let’s find out if there are any parallel execution happened with help of kql
1
2
3
union *
| where timestamp > datetime("2023-08-11T19:27:17.250Z") and timestamp < datetime("2023-08-13T19:27:17.250Z")
| where operation_Id == "08d258cc402ad010f3412dc5d3f16b27"
1
2
3
4
5
6
union *
| where timestamp > datetime("2023-08-11T19:27:17.250Z") and timestamp < datetime("2023-08-13T19:27:17.250Z")
| where operation_Id == "08d258cc402ad010f3412dc5d3f16b27"
| summarize RecordCount = count(), Records = make_list(pack_all()) by timestamp
| where RecordCount > 1
| project timestamp, Records

Now we got the expected result, as there is only one core to handle 100 concurrent requests it does in the concurrency fashion without any parallelism involved. Hence we got zero duplicate records from the above kql query.

https://learn.microsoft.com/en-us/azure/azure-functions/event-driven-scaling?tabs=azure-cli#limit-scale-out


  • Dynamic concurrency on Azure Blob, Azure Queue, and Service Bus triggers
  • will experiment on the concurrency in single core processor. Probably I will choose a virtual machine with single core and test my application there.