Skip to main content

Running Load Tests on Microsoft Azure with IP Switching feature

One year ago I started to investigate how we could use Load Test feature that is available on Visual Studio 2013 Ultimate and Microsoft Azure on our own project. The main idea was to develop a mechanism to test complex scenarios (especially written in C#) that can simulate 10k, 20k and even 100k users.
The idea was accepted by client and we end up with a great and interesting application that can block a system witch worth millions. This is great from both sides. Mission complete for the team that defined the load tests, because they were able to define the load tests. But in the same time great for the development team and especially for the support team because they know the limits of the system.
Now, we stuck with another problem. Because we are using Microsoft Azure infrastructure to run Load Tests (having our own hardware would be to expensive), we cannot simulate calls from multiple IP address.
This is a current limitation Visual Studio Online - IP Switching feature is not yet available. What does this mean? Basically you cannot run/configure a Load Test from Visual Studio Online to use multiple IPs during load test.
At the beginning, this feature was not very important for us, but now we realize that we would like to have this ability.
What we could do?
Based on the feedback that we received, we have a pretty good option. We can configure Test Controllers and Test Agents for this purpose. We’ll need to create VMs on Microsoft Azure that will play the role of Test Agents. This machine will be uses to run the load tests. Because each machine has a different IP, it will be pretty simple to distribute the tests on this machines.
Next, I would like to go more dipper and discuss a little about this solution.
Let’s define two terms that appeared in the above paragraph. A Test Controller is the one that orchestrate all the load test. Is the one that send the tests to each node and wait the tests to run, collect the result and so on. A Test Agent is the node where the load tests are run. Test Agents represents the nodes that are used to run the tests.
The relationship between Test Controller and Test Agents is 1 to N. This means that we can have in a configuration one Test Controller that orchestrate the load tests, but we can have multiple Test Agents that will be used to run the tests.

It is important to know that one license of Visual Studio 2013 Ultimate it is enough for all this. You don’t need a different license for each Test Agent.
We can have different configurations. For example we can use only one machine that can play the role of Test Controller and Test Agent. Another option is to have Test Controller and Test Agents installed on different machines and Visual Studio installed only on the machine that is used by testers/developers to trigger the load test.
If you try to do something like this on Microsoft Azure don’t forget to open the port number 6901. This is the default port number uses by nodes for incoming calls. Don’t forget that all communication between the machine where Visual Studio is installed (machine from where the load test is triggered) and Test Agents is made through Test Controller.
Based on this information we should create VMs on Microsoft Azure that play the role of Test Controller and Test Agents. You can create and configure only one time and reuse them each time when you need it.
Useful links:

Comments

  1. Hello!
    What if you want to run more than 10K virtual users with IP Spoofing? How many Azure VMs should I create?

    Regards!

    ReplyDelete

Post a Comment

Popular posts from this blog

Windows Docker Containers can make WIN32 API calls, use COM and ASP.NET WebForms

After the last post , I received two interesting questions related to Docker and Windows. People were interested if we do Win32 API calls from a Docker container and if there is support for COM. WIN32 Support To test calls to WIN32 API, let’s try to populate SYSTEM_INFO class. [StructLayout(LayoutKind.Sequential)] public struct SYSTEM_INFO { public uint dwOemId; public uint dwPageSize; public uint lpMinimumApplicationAddress; public uint lpMaximumApplicationAddress; public uint dwActiveProcessorMask; public uint dwNumberOfProcessors; public uint dwProcessorType; public uint dwAllocationGranularity; public uint dwProcessorLevel; public uint dwProcessorRevision; } ... [DllImport("kernel32")] static extern void GetSystemInfo(ref SYSTEM_INFO pSI); ... SYSTEM_INFO pSI = new SYSTEM_INFO(

ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded

Today blog post will be started with the following error when running DB tests on the CI machine: threw exception: System.InvalidOperationException: The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information. at System.Data.Entity.Infrastructure.DependencyResolution.ProviderServicesFactory.GetInstance(String providerTypeName, String providerInvariantName) This error happened only on the Continuous Integration machine. On the devs machines, everything has fine. The classic problem – on my machine it’s working. The CI has the following configuration: TeamCity .NET 4.51 EF 6.0.2 VS2013 It see

Navigating Cloud Strategy after Azure Central US Region Outage

 Looking back, July 19, 2024, was challenging for customers using Microsoft Azure or Windows machines. Two major outages affected customers using CrowdStrike Falcon or Microsoft Azure computation resources in the Central US. These two outages affected many people and put many businesses on pause for a few hours or even days. The overlap of these two issues was a nightmare for travellers. In addition to blue screens in the airport terminals, they could not get additional information from the airport website, airline personnel, or the support line because they were affected by the outage in the Central US region or the CrowdStrike outage.   But what happened in reality? A faulty CrowdStrike update affected Windows computers globally, from airports and healthcare to small businesses, affecting over 8.5m computers. Even if the Falson Sensor software defect was identified and a fix deployed shortly after, the recovery took longer. In parallel with CrowdStrike, Microsoft provided a too