我有一个运行wordpress应用程序的ElasticBean秸秆应用程序,当健康检查主页在4xx and 5xx范围内返回一个HTTP代码时,我想要一些监视和缩放触发器。我知道监控选项卡和容量选项卡来自弹性豆柄中的配置部分。我在那里看到了缩放规则和健康检查字段。下面是我正在寻找的环境行为:
Scaling triggers
- Health check -- which is the [home page][1] (/index.php) -- returns a response status code within 4xx and 5xx
- spin up a new instance behind the Elastic Load Balancer which will handle web traffic
- in the meantime direct all traffic to the maintenance page
- If over a period of 3 minutes no instance is returning a health check response within 4xx and 5xx from the home page
- either scale down to two instances or keep the two "healthy" instances in rotation behind the ELB.我是否需要使用上面提到的选项卡(监视和容量)?有人能告诉我在AWS弹性豆柄中设置上述环境触发器吗?
发布于 2019-02-23 15:01:30
基本上,您可以使用AutoScaling组(ASG)和弹性负载均衡器(ELB)和Bean秸秆创建的内置健康检查来完成所有您想要做的事情。
要做到您想做的事情,您需要做一些脚本来构建您自己的健康检查机制和操作。如果上面描述的内容对您有效,那么您所需要做的就是更改ASG上的健康检查类型,以及(可选) ELB健康检查上的计时器。
因为这是在豆茎中,所以所有这些都需要通过EBExtensions (代码片段来改变Bean秸秆环境中的基础结构)进行配置,因为我不认为这些选项目前都可以在Bean秸秆控制台中使用。下面是一个用于将ASG的健康检查类型更改为ELB的EBExtension示例。https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environmentconfig-autoscaling-healthchecktype.html
https://serverfault.com/questions/954209
复制相似问题