AWS ELB不分发在某些情况下要求自动缩放组EC2实例 [英] AWS ELB doesn't distribute requests to auto scaling group EC2 instances in some cases

查看:798
本文介绍了AWS ELB不分发在某些情况下要求自动缩放组EC2实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图做性能测试我的自动伸缩群使用JMeter的AWS。

I'm trying to do performance testing for my AWS auto scaling group using jmeter.

首先,我做了扩展输入/输出测试。我设置的门槛是70%的CPU利用率为2周期,每个周期为2分钟。该ELB工作正常,并请求被分配到自动缩放组中的所有EC2实例,尽管联合国的平等,在系统向外扩展。

Firstly, I did scale-in/out testing. I set the threshold to be 70% cpu utilization for 2 periods, each period is 2 minutes. The ELB works fine, and the requests was distributed to all EC2 instances in auto scaling group, in spite of un-equality, after the system scale-out.

在接下来,我想测试的两个实例负载是否可以两次的一个实例的。 我固定的自动缩放组的实例数,我设置的最小/最大/所需的实例数为2。当我把负载从单一JMeter的,总有那么仅仅只有一个实例作品和它的CPU占用率达到近100%,但其他实例的CPU利用率仍为零....如果我把负载从其中包含几个奴隶,所有实例都需要一个负载JMeter的群集。

In next, I want to test whether the two instances' load can be twice of one instance's. I fixed the instance number of auto scaling group, I set the min/max/desired instance count to be 2. When I push load from single JMeter, there are always just only one instance works and its cpu utilization reach almost 100 percent, but the cpu utilization of the other instance is still zero.... If I push load from an JMeter cluster which contains several slaves, all instances take load.

有人说,也许负荷不够重,所以ELB认为只有一个实例可以处理它,并没有请求分派给其他实例。我不这么认为,因为我推负荷从这个JMeter的簇只有一个奴隶,但我增加负载,仅仅只有一个实例处理请求。

Somebody said, maybe the load is not heavy enough, so the ELB considered that just one instance can handle it and didn't dispatch requests to other instance. I don't think so, because I push load from just one slave of this JMeter cluster, however I increase the load, just only one instance handle requests.

我发现了一个博客里面说ELB是伟大的HA而不是负载均衡。 https://www.stackdriver.com/elb-affinity-problems 但是,我不认为行为,只有一个实例处理请求,是正常的。

I found an blog which said ELB is great in HA but not load balancing. https://www.stackdriver.com/elb-affinity-problems But, I don't think the behavior, only one instance handle requests, is normal.

什么在ELB负载均衡机制的地狱?我很困惑。

What the hell in the ELB load balance mechanism? I'm confused.

推荐答案

我有这个问题,不平衡ELB流量时,后端的情况下在不同的可用区域和ELB正在接受从一个小数量的客户端请求。在我们的例子中,我们正在使用中的应用程序层的内部ELB。在你的情况,从单一的JMeter的推力载荷可能是指少数的客户端所看到的ELB。解决的办法是启用跨区域负载均衡使用类似于此片段API: -

I had this issue with unbalanced ELB traffic when back end instances where in different availability zones and the ELB was receiving requests from a small number of clients. In our case we were using an internal ELB within the application tiers. In your case "push load from single JMeter" likely means a small number of clients as seen by the ELB. The solution was to enable cross zone load balancing using the API similar to this fragment:-

ELB - 修改 - 磅 - 属性$ {} ELB --region $ {}区--crosszoneloadbalancing启用=真

elb-modify-lb-attributes ${ELB} --region ${REGION} --crosszoneloadbalancing "enabled=true"

<一个href="http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/enable-disable-crosszone-lb.html" rel="nofollow">http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/enable-disable-crosszone-lb.html

这篇关于AWS ELB不分发在某些情况下要求自动缩放组EC2实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆