简体   繁体   English

我应该在AutoScaling中使用CloudWatch警报还是“ as-create-or-update-trigger”

[英]Should I use CloudWatch alarm or “as-create-or-update-trigger” for my AutoScaling

Now I am going to configure AutoScaling for my web application on AWS. 现在,我将在AWS上为我的Web应用程序配置AutoScaling。 I have read several blogs and AWS documentation for a perfect solution of my AutoScaling. 我已经阅读了几个博客和AWS文档,以获取有关AutoScaling的完美解决方案。

Now I have an idea that I have to create AutoScaling policy (Scale Up and Scale Down) using "as-put-scaling-policy" command. 现在,我有了一个想法,我必须使用“ as-put-scaling-policy”命令创建AutoScaling策略(向上和向下缩放)。 Then I have to trigger the policy using "mon-put-metric-alarm" ie CloudWatch (High Alaram and Low Alaram). 然后,我必须使用“ mon-put-metric-alarm”即CloudWatch(High Alaram和Low Alaram)来触发策略。 By this way I can configure AutoScaling for my application. 通过这种方式,我可以为我的应用程序配置AutoScaling。

Again some blogs are describing to use "as-create-or-update-trigger". 再次,一些博客描述使用“ as-create-or-update-trigger”。 With this single command we can achieve the scaleup and scaledown action. 使用此单个命令,我们可以实现按比例放大和按比例缩小操作。 eg: 例如:

as-create-or-update-trigger my-latency-trigger --auto-scaling-group sbsgroup --dimensions "LoadBalancerName=myloadbalancer" --measure Latency --period 60 --statistic Average --lower-threshold 0.25 --upper-threshold 0.75 --breach-duration 300 --lower-breach-increment=-1 --upper-breach-increment 1 --namespace "AWS/ELB" --unit Seconds

Now I have one confusion that should I use CloudWatch Alarms to trigger instances or as-create-or-update-trigger. 现在,我有一个困惑,我应该使用CloudWatch Alarms来触发实例或as-create-or-update-trigger。 Please suggest me. 请给我建议。 Or give me a guide if my findings are wrong. 如果发现错误,请给我指导。

Use the CloudWatch alarms - as-create-or-update-trigger has been deprecated and only there for backwards compatibility. 使用CloudWatch警报-as-create-or-update-trigger已被弃用,仅向后兼容。

From http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-trigger.html 来自http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-trigger.html

Important 重要
Triggers are a deprecated feature of Auto Scaling. 触发器是Auto Scaling不推荐使用的功能。 We recommend that you switch from using triggers to using Auto Scaling policies and alarms. 我们建议您从使用触发器切换为使用Auto Scaling策略和警报。 For more information, see Configuring Auto Scaling in the Auto Scaling Developer Guide. 有关更多信息,请参见《 Auto Scaling开发人员指南》中的“配置Auto Scaling”。

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

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