简体   繁体   English

定义Azure Web角色的扩展阈值

[英]Defining Scaling Threshold for Azure Web Roles

Azure embraces the notion of elastic scaling and I've been able to acheive this with my Worker Roles . Azure拥抱弹性缩放的概念,我已经能够通过我的工作者角色来实现这一点。 However, when it comes to my Web Roles ( eg MVC Apps ) I am not sure what to monitor ( or how ) to determine when its a good time to increase ( or descrease ) the number of running instances. 但是,当涉及到我的Web角色例如MVC应用程序 )时,我不确定要监视( 或如何 )确定何时增加( 或减少 )运行实例的数量的好时机。 I'm assuming I need to monitor one or many Performance Counters but not sure where to start. 我假设我需要监控一个或多个性能计数器,但不知道从哪里开始。

Can anyone recommend a best practice for assessing an MVC Web Role instances load relative to scaling decisions? 任何人都可以推荐一种最佳实践来评估相对于扩展决策的MVC Web角色实例加载吗?

This question is a bit open-ended, as monitoring is typically app-specific. 这个问题有点开放,因为监控通常是针对特定应用的。 Having said that: 话说回来:

Start with simple measurements that you'd look at on a local server, representing KPIs for your app. 从您在本地服务器上查看的简单测量开始,代表您的应用程序的KPI。 For instance: Maybe look at network utilization. 例如:也许看看网络利用率。 This TechNet article describes performance counters collected by System Center for Windows Azure. 此TechNet文章介绍了System Center for Windows Azure收集的性能计数器。 For instance: 例如:

  • ASP.NET Applications Requests/sec ASP.NET应用程序请求/秒
  • Network Interface Bytes 网络接口字节
  • Received/sec 接收/秒
  • Network Interface Bytes Sent/sec 网络接口字节发送/秒
  • Processor % Processor Time Total 处理器%处理器时间总计
  • LogicalDisk Free Megabytes LogicalDisk免费兆字节
  • LogicalDisk % Free Space LogicalDisk%可用空间
  • Memory Available Megabytes 内存可用兆字节

You may also want to watch # of requests queued and request wait time. 您可能还希望观看排队的请求数和请求等待时间。

Network utilization is interesting, since your NIC provides approx. 网络利用率很有意思,因为您的NIC提供了大约。 100Mbps per core and could end up being a bottleneck even when CPU and other resources are underutilized. 每个核心100Mbps,即使CPU和其他资源未得到充分利用,也可能成为瓶颈。 You may need to scale out to more instances to handle high-bandwidth scenarios. 您可能需要扩展到更多实例以处理高带宽方案。

Also: I tend to give less importance to CPU utilization, even though it's so easy to measure (and shows up so frequently in examples). 另外:我倾向于不太重视CPU利用率,即使它很容易测量(并且在例子中如此频繁地显示)。 Running a CPU at near capacity is a good thing usually, since you're paying for it and might as well use as much as possible. 以接近容量运行CPU通常是件好事 ,因为你付出了代价并且尽可能多地使用它。

As far as decreasing : This needs to be handled a bit more carefully. 至于减少 :这需要更仔细地处理。 Windows Azure compute is billed by the hour. Windows Azure计算按小时计费。 If, say, you scale out to an extra instance at 11:50 and scale in again at 12:10, you've just incurred two cpu-hours. 例如,如果您在11:50扩展到额外的实例并在12:10再次扩展,那么您刚刚发生了两个cpu-hours。 Also: You don't want to scale out, then take new measurements and deciding you can now scale back again (effectively creating a constant pulse of adding and decreasing instances). 另外:您不希望向外扩展,然后进行新的测量并决定您现在可以再次缩放(有效地创建添加和减少实例的恒定脉冲)。 To make things easier, consider the Autoscaling Application Block (WASABi), found in the Enterprise Library . 为简化操作,请考虑企业库中的Autoscaling Application Block(WASABi)。 This has all the scale rules baked in (such as the ones I just mentioned) and is very straightforward to use. 这包含了所有规模规则(例如我刚才提到的规则)并且使用起来非常简单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM