In the previous article, I'm set up a Virtual machine Scale set (VMSS) behind a load balancer with a manually adjust number of VMs: Migration on-premise ERP(Legacy) to Azure Part 3 : Config VMs scale sets
In this article. I will be going to make 3 scenarios to test how a load balancer working. and try to config VM auto-scale feature by Simulate Application server running IIS in a scale set by trigger HTTPS request to the application server for creating Sales order record in Azure SQL
Environment provisioning
1. Create Virtual Machin Scale set with two scenario
- Manual scale set 2 VMs
- Auto Scale Set 2 => 4 VMs
-Size of VM
using small VMs size (B1s) because I want to see the movement of CPU and Ram during high workload.
- Configuration Loadbalancer
Loadbalancer will allocate requests from clients to VMs that are behind in the backend pool. In this case backend pools are VM scale sets.
2. Create Azure SQL for Database Ties
3. Create a simple application using C# hosting on the IIS connected Azure SQL
Because my ERP application server requires more dependency and takes time to install. So I going to create a Web API using C# to simulate the Sales Order logic functionality. another article for Create Net Core web API using C#: Create and Publish NETCore web-API running on Azure container Instance
4. Use Postman to check the connection from Client to App and database tier working find before initial huge request test. if the transaction is complete the server will return the order number.
Testing Stage
I simulate sales order requests from clients by using loading.io
by condition
How does my server perform when 100 users connect every 1 second over 4 minutes Duration?
Test Result
3.1 Single Instants
3.2 Two Instants manual scale set
Average Response Time 3008 / Response Counts success 13,141 / Zero Timeout
The initial of VMs is 2 and can increase to 4 Instants maximum. By increase 1 Instant if CPU threshold an over 50%
So the conclusion from my Lab The VM scale set is working for elastic requests by config autoscale. it still a good idea for traditional software that requests running on VMs
But you may need to consider the Autoscale rule conditional.
Next Article I will testing about container-based applications on Azure.
Performance testing on Azure VMs, App Services Scalable, and Container Instances (Part1)