By using AWS re:Post, you agree to the Terms of Use

aws auto scaling routing

0

Did auto scaling setup and using Step scaling policy to scaleout and scalein. when CPU Max reaches 40 above Scaling is happening and another server came to available also but sometimes request is going to the first server which has high CPU utilization because of that server is crashing. Using round robin in load balancer still its not routing properly. How to solve it?

2 Answers
0

What load balancer are you using? Does it have sticky sessions enabled by any chance?

Some insights - https://aws.amazon.com/premiumsupport/knowledge-center/elb-fix-unequal-traffic-routing/

Sample Tutorial just for you to double check the configs - https://docs.aws.amazon.com/autoscaling/ec2/userguide/tutorial-ec2-auto-scaling-load-balancer.html

profile picture
answered 20 days ago
  • Using Application load balancer. Stickiness is Disabled in Target group attributes

0

Round Robin means that 2 targets on the ALB will each get every other request. If you want the majority of the requests to go to the new instance (until they're evened out) then you should use Least Outstanding Requests: https://aws.amazon.com/about-aws/whats-new/2019/11/application-load-balancer-now-supports-least-outstanding-requests-algorithm-for-load-balancing-requests/

However, you should also look into why the first instance is crashing when the CPU is only around 40%. See if there's a different resource other than CPU that's your bottleneck (memory, disk, network, artificial application limits, etc). If might be that you can get much better performance by changing instance families to one better suited for your resource requirements

answered 18 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions