[Windows Azure] Load Testing in Windows Azure

时间:2021-09-05 16:29:33

The primary goal of a load test is to simulate many users accessing a web application at the same time. The load test simulates multiple users opening simultaneous connections to the application and making multiple requests against an application or directly against a data repository such as SQL Azure. You can run a load test with a constant load pattern or an ever increasing load in order to determine the point at which response times become unacceptable or the application begins to generate errors. For example, one of the uses of a load test is to help determine if there is a point at which the application fails entirely. Because your goal is discovery of actual capacity rather than confirmation of a particular load level, you want to exceed the anticipated peak by a healthy margin. For example, you may have 1000 concurrent users during normal usage; but, you want to determine if you can handle anticipated growth to 2000 users. You can create a test that will ramp gradually to a peak of 3000 concurrent or more users. When the test is complete, you will know if tuning or enhancements are required to reliably handle potential peak loads plus a safety margin. Issues that can eventually come out as the result of load testing may include load balancing problems and processing capacity of the existing system.

A load test allows you to:

  • Quantify risk: You can determine, through load testing, the likelihood that system performance will meet the stated performance expectations and service level agreement, such as response time requirements under given levels of load. This is a traditional Quality Assurance (QA) type test. Load testing does not mitigate risk directly, but through identification and quantification of risk and potential bottlenecks, presents tuning opportunities and an impetus for remediation that will mitigate risk.
  • Determine minimum configuration: You can conduct a capacity planning and determine, through load testing, the minimum configuration that will allow the system to meet performance expectations so that extraneous compute instances and storage can be minimized. This is a Business Technology Optimization (BTO) type test.

Windows Azure provides value to your application in its ability to handle an elastic work load. To do so effectively you must know if your application is designed to scale effectively. The same elasticity that allows you to scale your cloud application enables to leverage Windows Azure to conduct load testing by:

  • Running the test agents as Windows Azure role instances or virtual machines which allows you to quickly create more of them and, thus, generate as much load as is necessary.
  • Allowing you to only deploy your test rig and its associated agents only when it needed. You only pay for the resources when you actually deploy the test rig and use the system.

You can build your test rig using custom code or a variety of third party tools. Combining Windows Azure and Visual Studio Ultimate, you can build a large, distributed test rig in a fast and automated way. Virtualization of computing resources eliminates the need for dedicated hardware for load testing. Different approaches and topologies can be used to provision a load test rig in Windows Azure.

Load tests are simulated with using a test controller and a set of test agents which are part of the load simulation architecture

The basic method is to create one "controller" and one or more "agents." You have one controller, but as many agents as you require. You can scale out the load by adding additional agents, depending on the amount of load you are required to generate. Each agent generates a part of the load. The controller agents and records the results of the test. The recommended approach when running load that simulates realistic loads typically requires at least two computers: the first runs the controller, and the second runs the agent or agents. You also need a results repository, which could be hosted on same computer as controller, or on a different computer. A different computer is usually recommended for the repository.

[Windows Azure] Load Testing in Windows Azure

The advantages of adopting a load test harness hosted in Windows Azure are multiple:

  • Entry Cost: The cost of doing load tests decreases greatly after the initial investment. Once deployed, the cost of the test rig depends on Windows Azure Pay-As-You-Go pricing model.
  • Maintenance Cost: you can create an easily maintain a test harness in Windows Azure.
  • Elasticity: The load test can be easily modified to accommodate different scenarios and conditions. For example, you can configure the Azure hosted test rig with a larger number of test agents.
  • Repeatability: After the initial investment, you can use the same artifacts (VS cloud project or VM images) to deploy a new test rig in Windows Azure, run a load test for the necessary time and undeploy it.

With Windows Azure, you can host the controller and agent processes in different worker role instances.

The major components are:

  • Agents: Using worker roles you take advantage of the elastic nature of Windows Azure compute instances to scale out the agents and generate the required load more easily.
  • Controller: The controller must communicate with the different agents in the rig. It starts and stops the tests in the different agents, tracks agent status and collects test results. It also collects performance data from the agents and the system being tested. You can use either a worker role or an on on-premise computer that communicates with the worker roles using Windows Azure Connect. For information on determining which configuration works best, see Running Load Tests In Mixed Environments.
  • Windows Azure Connect: The Windows Azure Connect endpoint software must be active on all Azure instances and on the Controller machine as well. This allows IP connectivity between them and, given that the firewall is properly configured, allows the Controller to send workloads to the agents. In parallel, and using the LAN, the Controller will collect the performance data on the stressed systems, using the traditional WMI mechanisms.

The following diagram shows how applying the Windows Azure features to the test rig facilitates your implementation.

[Windows Azure] Load Testing in Windows Azure

For a reference implementation of this architecture, see Using Visual Studio Load Tests in Windows Azure Roles by Paolo Salvatori and Sidney Higa which contains:

  • Visual Studio Load Test in Windows Azure Overview Describes the benefits of using Visual Studio Load Test and outlines the required steps.
  • Windows Azure Load Test Prerequisites and Setup Lists the requirements for the solution.
  • Provisioning Windows Azure For a Load Test Detailed instructions on how to set up the load test application before publishing.
  • Publishing the Load Test To Windows Azure Describes the steps for publishing a Load Test to Azure.
  • Running Load Tests In Mixed Environments A mixed environment is one in which the components of a load test (test controller, agents, results repository, and tested system) reside in different environments, such as on-premises and in Windows Azure. This document explains how you can proceed to configure such a scenario.
  • Performance Counters in Load Tests on Windows Azure Collect performance counters from an application running in a separate hosted service

[Windows Azure] Load Testing in Windows Azure的更多相关文章

  1. 转 如何使用Windows Media Load Simulator进行Windows Media服务器性能测试和监控

    Windows Media Load Simulator(WMLS)有两个主要的用途:作为极值或者压力测试工具和在线监视器.   1   极值和压力压力测试:你能够在达到期望的极值压力条件下测试离线的 ...

  2. 使用Python SDK管理Azure Load Balancer

    概述 下面将演示如何使用Python SDK管理中国区Azure Load balancer.关于Azure负载均衡器的详细功能介绍,请参考官方文档. Code Sample import os fr ...

  3. Windows Azure HandBook (4) 分析Windows Azure如何处理Session

    <Windows Azure Platform 系列文章目录> 本文是对笔者之前的文章Windows Azure Cloud Service (13) 多个VM Instance场景下如何 ...

  4. Windows Azure Cloud Service &lpar;42&rpar; 使用Azure In-Role Cache缓存&lpar;1&rpar;Co-located Role

    <Windows Azure Platform 系列文章目录> Update 2016-01-12 https://azure.microsoft.com/zh-cn/documentat ...

  5. &lbrack;Windows Azure&rsqb; Enabling Diagnostics in Windows Azure

    Enabling Diagnostics in Windows Azure Windows Azure Diagnostics enables you to collect diagnostic da ...

  6. Windows Azure Storage &lpar;19&rpar; 再谈Azure Block Blob和Page Blob

    <Windows Azure Platform 系列文章目录> 请读者在参考本文之前,预习相关背景知识:Windows Azure Storage (1) Windows Azure St ...

  7. Windows Azure HandBook &lpar;3&rpar; 浅谈Azure安全性

    <Windows Azure Platform 系列文章目录> 2015年3月5日-6日,参加了上海的Azure University活动.作为桌长与微软合作伙伴交流了Azure相关的技术 ...

  8. Windows Azure Web Site &lpar;15&rpar; 取消Azure Web Site默认的IIS ARR

    <Windows Azure Platform 系列文章目录> 我们知道,Azure Web Site (改名为Azure Web App)默认是可以保留Session的.Azure We ...

  9. Windows Azure Cloud Service &lpar;43&rpar; 使用Azure In-Role Cache缓存&lpar;2&rpar;Dedicated Role

    <Windows Azure Platform 系列文章目录> Update 2016-01-12 https://azure.microsoft.com/zh-cn/documentat ...

随机推荐

  1. SQL中 将同一个表中的A列更新到B列,B列更新到A列

    有网友在SKYPE问及,如标题,SQL中 将同一个表中的A列更新到B列,B列更新到A列. 其实这个不是问题,直接写更新语句即可,可以参考下面动画演示: SQL source code: CREATE ...

  2. python学习-day16:函数作用域、匿名函数、函数式编程、map、filter、reduce函数、内置函数r

    一.作用域 作用域在定义函数时就已经固定住了,不会随着调用位置的改变而改变 二.匿名函数 lambda:正常和其他函数进行配合使用.正常无需把匿名函数赋值给一个变量. f=lambda x:x*x p ...

  3. CSS基本知识汇总

    1.CSS 简介 CSS 指层叠样式表 (Cascading Style Sheets),是一种用来表现 HTML 文档样式的语言,样式定义如何显示 HTML 元素,是能够真正做到网页表现与结构分离的 ...

  4. Oracle 通过触发器 来创建 同步临时表 及处理 通过 自治事务 来解决 查询 基表的问题

    // 触发器 create or replace trigger tr_sync_BD_MARBASCLASS after INSERT or UPDATE on BD_MARBASCLASS for ...

  5. Python科学计算(一)环境简介——Anaconda Python

    Anaconda Python 是 Python 科学技术包的合集,功能和 Python(x,y) 类似.它是新起之秀,已更新多次了.包管理使用 conda,GUI基于 PySide,所有的包基本上都 ...

  6. 【HDOJ】【1693】Eat The Trees

    插头DP 插头dp模板题…… 这题比CDQ论文上的例题还要简单……因为不用区分左右插头(这题可以多回路,并不是一条哈密尔顿路) 硬枚举当前位置的状态就好了>_< 题解:http://blo ...

  7. oracle lsnrctl status&vert;start&vert;stop

    [oracle@redhat4 ~]$ lsnrctl status LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 06-OCT-2015 ...

  8. PowerDesigner 怎么给 Table Properties 增加注释和默认值

    1.  选中表,右键 2. 选中“comment”, 这个就是列的注释 3.还是这个页面 ,往下有个“default value”, 这个就是你设置的默认值. 4. 这个是怎么设置默认值.

  9. java进程脱离终端运行

    关于 java 进程脱离终端放入后台运行的问题,首先想到是使用nohup命令: 研究了一下tomcat启动脚本.jenkins.war启动方式以及其他linux命令,结论是在目前的linux系统上不使 ...

  10. Java错误和异常

    Java 异常结构图 在 Java 中,所有的异常都有一个共同的祖先 Throwable(可抛出).Throwable 指定代码中可用异常传播机制通过 Java 应用程序传输的任何问题的共性.  Th ...