Why is my load test is not %100 success?

0

Hello, I am using Elastic BeanStalk and I create minimum 3 ec2 instances with auto scale.I have one rest api as service.I am using mongo cloud atlas.And rest api get data from mongo cloud atlas.service and mongo is in the same region. I am doing load test with task is 5 and concurrency is 200.I am watching ec2 instances cpus , load balancers requests and mongo db monitoring.Everything seems ok for example cpu usage on level %10 but some tests is fail.Sometimes %30 is success.How can I catch the reaoson of the fail tests?

1 個回答
0

You are likely encountering a lag with auto scaling. Your Auto Scaling Group (ASG) is detecting sustained load above your CPU target and begins to "warm up" a new instance to add to your ASG. Depending on a number of factors your load test may be expanding the load faster than your current scaling policy can service that extra load.

You may need to enable and adjust DefaultInstanceWarmup (a setting that lets an instance warm up all the way ready before it is available to serve requests).

Another thing to look at is how your instances are created. If you're doing a lot in the User Data script your instances may not be warming up quickly enough.

Finally, you could also look at your CPU targets. Either trigger scaling earlier in the load profile, or even question your assumption that CPU load is the correct metric to scale on. If your app is IO bound for instance then CPU isn't a good proxy for load, or perhaps number of requests is a better proxy etc.

Once you've got your scaling policy tuned you should see more consistent results. Attaining 100% success guaranteed may need to be traded off against the extra expense of having semi-idle resources available.

已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南