20170226-云计算设计模式翻译-自动伸缩指南(逐字翻译)

时间:2017-10-23 23:43:49   收藏:0   阅读:361

--自己逐字翻译的。

Autoscaling Guidance

自动伸缩指南

Constantly monitoring performance and scaling a system to adapt to fluctuating workloads to meet capacity targets and optimize operational cost can be a labor-intensive process. It may not be feasible to perform these tasks manually. This is where autoscaling is useful.

进行连续的性能监控和系统伸缩以适应不断变化的工作负载来满足流量目标、优化运营成本,这是一个劳动密集型的过程。手动地执行这些任务几乎是不可行的,这是自动伸缩发挥作用的地方。

What is Autoscaling?

什么是自动伸缩?

Autoscaling is the process of dynamically allocating the resources required by an application to match performance requirements and satisfy service level agreements (SLAs). As the volume of work grows, an application may require additional resources to enable it to perform its tasks in a timely manner.

自动伸缩是动态地分配应用程序所需资源以匹配性能需求同时满足服务等级协议(SLAs,Service Level Agreements)的过程。随着工作量的增长,应用程序可能需要额外的资源以及时使其执行任务。

Autoscaling is often an automated process that can help to ease management overhead by reducing the need for an operator to continually monitor the performance of a system and make decisions about adding or removing resources.

自动伸缩通常是一种自动化的过程,可以通过减少操作员持续监视系统性能、帮其决定添加或删除资源的方式来帮助缓解管理开销。

Autoscaling should also be an elastic process; more resources can be provisioned as the load increases on the system, but as demand slackens resources can be de-allocated to minimize costs while still maintaining adequate performance and meeting SLAs.

自动伸缩也应该是一个弹性的过程,随着系统上的负载的增加可以提供更多的资源,但是当需要减少时,资源可以被释放以达到成本最小化,同时仍然保持足够的性能且满足SLAs。

Note:

Autoscaling applies to all of the resources used by an application, not just the compute resources. For example, if your system uses message queues to send and receive information, it could create additional queues as it scales.

注意:

自动伸缩适应于应用程序的所有资源,而不仅仅是计算资源。例如,如果系统使用消息队列来发送、接收信息,则它可以在扩展时创建额外的队列。

Types of Scaling

伸缩类型

Scaling typically takes one of two forms—vertical and horizontal scaling:

伸缩通常有两种形式--垂直伸缩和水平伸缩:

垂直伸缩通常称为垂直扩展)需要你使用不同的硬件重新部署解决方案。在云环境中,硬件平台通常是虚拟化环境,垂直伸缩涉需要为该环境提供更强大的资源并将系统移动到这些新资源上。垂直扩展通常是一个破坏性的过程,在系统重新部署时需要使系统暂停使用。在配置新硬件和上线期间可以继续保持原始系统运行,但是在从旧环境转换到新环境过程中可能会有一些中断。通过实施垂直伸缩策略来使用自动伸缩并不常用。

水平伸缩(通常称为横向扩展)需要在额外的资源上部署系统。在配置这些资源时,系统可以继续运行而不中断。当配置过程完成时,构成系统的元素副本可以部署在这些附加的资源上且可用。如果需求下降,在使用这些资源的元素完全关闭之后,可以回收这些额外的资源。许多基于云的系统(包括Microsoft Azure)支持这种自动伸缩形式。

Implementing an Autoscaling Strategy

实施自动伸缩策略

Implementing an autoscaling strategy typically involves the following processes and components:

实施自动伸缩策略通常涉及以下内容:

 

Traditionally, many autoscaling solutions for the cloud depended on writing and configuring scripts that gathered the appropriate performance data, analyzed this data, and then added or removed resources as appropriate. It is now becoming increasingly common for cloud-based systems to provide built-in tooling to help reduce the time and effort required to implement autoscaling.

传统上,云的许多自动伸缩解决方案依赖于编写和配置脚本,这些脚本收集适当的性能数据,分析该数据,然后根据需要添加或删除资源。现在基于云的系统提供内置工具帮助减少实现自动伸缩所需的时间和精力变得越来越普遍。

However, it is important to implement an autoscaling strategy based on the specific requirements of the application rather than being driven by the features provided by any specific toolset. Scripting is still an essential skill, and a good autoscaling solution combines the features provided by the selected toolset with customizations in the form of scripts.

然而,基于应用的特定需求实现自动伸缩策略是重要的,而不是由任何特定工具集提供的专门功能完成。脚本仍然是一项基本技能,良好的自动伸缩解决方案是将基于工具集提供专门功能(的方式)与自定义脚本方式相结合。

Note:

If you are using Azure, you can access the Azure Management API through Windows PowerShell to script many tasks associated with starting and stopping instances and provisioning services.

注意:

如果你正在使用Windows Azure,你可以通过Windows PowerShell访问Windows Azure 管理接口,将开启关闭实例、配置服务相关的任务脚本化。

Considerations for Implementing Autoscaling

实施自动伸缩注意事项

Autoscaling is not an instant solution. Simply adding resources to a system or running more instances of a process does not guarantee that the performance of the system will improve. Consider the following points when designing an autoscaling strategy:

自动伸缩不是一个即时的解决方案。简单地给系统增加资源或运行更多的进程实例不能保证系统性能的提升。当设计自动伸缩策略时请考虑以下几点:

Autoscaling in a Azure Solution

Windows Azure解决方案中的自动伸缩

Azure provides several options for configuring autoscaling for your solutions:

Windows Azure 为用户的解决方案配置自动伸缩(策略)提供了几个选项:

The following sections summarize these approaches.

以下部分总结了这些方法。

Using Azure Autoscaling

使用Windows Azure自动伸缩

Azure Autoscaling enables you to configure scale out and scale in options for a solution. Using this feature you can automatically add and remove instances of Azure Cloud Services web and worker roles, Azure Websites applications, and Azure Virtual Machines. There are two approaches for configuring autoscaling in Azure:

Windows Azure 自动伸缩能够使用户通过选项为解决方案配置向外扩展、向内扩展。使用此功能,用户可以自动添加和删除Windows Azure云服务Web实例、工作者角色实例、Windows Azure网站应用程序和Azure虚拟机。在Windows Azure中配置自动伸缩有两种方式:

You should also consider scaling other resources linked to a compute instances as part of the same scalability unit. For example, you could resize SQL databases or add storage accounts as the system scales. However, at the time of writing, you must either perform these operations manually or use the Microsoft Enterprise Library Autoscaling Application Block.

用户还应该考虑将与计算实例相关的其他资源扩展为同一伸缩性单元的一部分。例如,用户可以在系统缩放时调整SQL数据库、添加存储帐户。但是,在编写本文时,用户必须手动执行这些操作或者使用Microsoft企业库自动伸缩应用程序块(完成这些操作)。

Note:

For more information about configuring autoscaling by using the Microsoft Azure Management Portal, see How to Scale an Application on MSDN.

注意:

有关使用Windows Azure网站管理界面配置自动伸缩的更多信息,请参阅MSDN上如何扩展应用程序。

Implementing Custom Autoscaling by Using the Microsoft Enterprise Library Autoscaling Application Block

通过使用微软企业库自动伸缩应用程序块实现自定义自动伸缩

The Microsoft Enterprise Library Autoscaling Application Block provides a highly customizable approach to scalability, enabling you to make scaling decisions based on performance counters or other custom metrics.

微软企业库自动伸缩应用程序块为伸缩性提供了一种高度定制的实现途径,使用户能够根据性能计数器或其他自定义指标做出扩展决策。

You specify rules that determine how the Autoscaling Application Block reacts to the metrics. These rules can be complex, and may reference combinations of metrics. For example, you could specify that the Autoscaling Application Block should start an additional instance of a worker role if the length of a message queue is growing at a certain speed and the role has less than 10% of available memory.

用户可以指定用于确定伸缩应用程序块如何对指标数据(队列长度、内存使用率等信息)做出反应的规则。这些规则可以是复杂的,并且可以引用综合指标。例如,如果消息队列的长度以一定速度增长,并且工作者角色(实例)可用内存小于10%,则可以指定自动伸缩应用程序块启动额外的工作者角色实例。

As with Azure Autoscaling, the Autoscaling Application Block also supports time-based scaling, and you can restrict the degree of autoscaling that can occur to help prevent excessive costs.

与Windows Azure Autoscaling一样,Autoscaling应用程序块也支持基于时间的伸缩,用户可以限制可能发生的自动伸缩程度,以帮助防止过高的成本。

Note:

The Autoscaling Application Block page on MSDN provides detailed information on configuring autoscaling, defining rules, and gathering performance data.

注意:

MSDN上自动伸缩应用程序块页面提供了有关配置自动伸缩、定义规则和收集性能数据的详细信息。

Implementing Custom Autoscaling by Using Azure Monitoring Service Library

使用Windows Azure监控服务类库实现自定义自动伸缩

The Azure Monitoring Service Library, which is in preview at the time of writing, can be used to monitor and automatically scale Azure deployments. In addition to defining autoscaling rules, this library provides options for monitoring and alerting. You can download the library from the NuGet gallery.

Windows Azure监控服务类库(在编写本文时处于预览阶段)可用于监控和自动伸缩Windows Azure部署。除了定义自动扩展规则之外,此类库还提供用于监控和警报的功能。可以从NuGet库下载库。

Related Patterns and Guidance

相关模式和指南

The following patterns and guidance may also be relevant to your scenario when implementing autoscaling:

在实施自动伸缩时,以下模式和指南也可能跟你的方案相关:

More Information

更多信息

 

原文:http://www.cnblogs.com/CharlesZHENG/p/7719600.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!