You need to perform stress (load) testing of your Azure App Service hosted in App Service Plan. By carrying out stress testing with a high volume of users (connections) and for a sufficiently long period of time, you should acquire a better understanding of your application behavior under heavy load, based on your requirements and expectations. Each possible issue which may come up during stress testing can manifest under different circumstances, in different configurations and under different application loads and application dependencies. It is important that you first perform extensive testing to isolate the scope of your App Service issue and be able to replicate your issue in a consistent manner before proceeding with any further troubleshooting.
To diagnose and solve problems related to Azure App Service, review the following KB article:
This article provides high level guidance on how to perform Azure App Service stress testing.
Use Azure Load Testing service #
Azure Load Testing Preview is a fully managed load-testing service in Azure that enables you to generate high-scale load. The service simulates traffic for your applications, regardless of where they’re hosted and can be used by developers, testers, and quality assurance (QA) engineers for performance, scalability and capacity planning tests. In Azure load testing you have two options:
1. Create a quick test. Quickly create a load test for your web application by using a URL, and without prior knowledge of testing tools. Azure Load Testing abstracts the complexity and infrastructure to run your load test at scale. The following example shows a quick load test for site https://stefanos.cloud
The test results are shown upon load test execution.
2. Import an Apache JMeter load testing script.
This second method utilizes a JMeter script as the test plan and also asks for the following parameters:
- Environment variables
- Configure the number of test engines that would be required to run your test.
- Configure networking to enable the test traffic to reach your public or private end points.
- Define test criteria to specify the performance expectations of the system under test. These are failure criteria and the test will fail if any of the criteria evaluates to true.
- Configure application components to monitor server-side metrics during the test run.
To provision and configure an Azure load testing resource, carry out the steps below.
- Provide the basic parameters and click Next.
- Choose encryption type and click Next.
- Optionally provide tags and click Create to create the new Azure Load Testing resource.
Use Apache JMeter #
You can test an Azure App Service VCF service using JMeter by adding HTTP Request sampler to the Thread Group and giving server/host name & path. For Post request to send parameters, if it is a json data, send in the form of Body Data in HTTP Request and add Content-Type as application/json in HTTP Header Manager. Apply Parameterization and Correlation to start the load test with many concurrent users.
Use Crank #
One of the most noteworthy stress testing frameworks is Crank. The Crank framework can be used when testing SignalR applications. You should review the following links for further guidance:
Use Grafana K6 #
Grafana k6 is an open-source load testing tool that makes performance testing easy and productive for engineering teams. k6 is free, developer-centric, and extensible. Using k6, you can test the reliability and performance of your systems and catch performance regressions and problems earlier. k6 will help you to build resilient and performant applications that scale. k6 is developed by Grafana Labs and the community.