Skip to Content
Web容量规划之美
book

Web容量规划之美

by Arun Kejariwal, John Allspaw
August 2019
Beginner to intermediate
232 pages
3h 50m
Chinese
China Electric Power Press Ltd.
Content preview from Web容量规划之美
173
自动扩缩容
当这个特定的度量已经到达一个阈值时可以配置一个测量报警发送消息。报警
发送消息时,自动扩缩容策略将在
ASG
组中增加或者减小规模。注意,当指
定的度量值在一定时间内超过阈值时,将调用自动扩缩容操作。这是为了确保
扩缩容动作不会因为突然的流量峰值而被触发。
定义
2
策略是一组自动缩放指示服务如何应对度量报警信息的指令。
单独的策略制定自动扩容和自动缩容。与自动扩缩容策略相关的两个关键参数
如下:
Scalingadjustment
:实例数的规模,
AdjustmentType
决定这个数字的解释(例
如,一个绝对数量或作为现有
ASG
大小)的百分比。正值将增加当前容量,
负值将从当前容量中移除。
Adjustmenttype
:指定是否
Scalingadjustment
是绝对数或总数的百分比。有
效值是变化的能力或
PercentChangeInCapacity
(在本章的后面讲述)。
自动扩缩容的动作,尤其是扩容,通常需要一段时间才能生效。鉴于此,你可
以指定一个冷却时间(定义的瞬间)以确保新的事件在前一事件完成后触发自
动扩缩容。
定义
3
冷却时间是指扩缩容启动扩缩操作后的一段时间,在此期间不能进行其他扩缩
容操作。冷却期允许扩缩容操作的效果在最初出发该活动的度量中可以看到。
冷却期是可配置的,给出了系统的时间来执行和适应任何新的扩缩容活动(缩
容和扩容)影响的能力。
AWS
上,这个也可以通过时间的方式,称为定标。特别是基于时间表的扩
缩容允许你根据可预测的负载变化和对应用程序进行扩缩容。例如,如果星期
五晚上流量开始增加,并且一直保持到星期日晚上,那么你就可以根据
Web
应用程序的可预测流量模式进行扩缩容操作。要创建预定的扩缩容操作,必须
制定扩缩容操作的开始时间和扩缩容操作新的最小、最大和所需的大小。在指 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

GPT-3

GPT-3

Sandra Kublik, Shubham Saboo

Publisher Resources

ISBN: 9787519831073