Series 2 : Concurrency experiment in A1 v2 (1 vcpu, 2 GiB memory) Virtual machine
About this blog
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.
Pre Requisites
- 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
Experiments
Visualization in Application Insight
- 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
Execute Kql in LogWorspace
|
|
|
|
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.
References
Future experiments
- 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.