AWS loadbalancing between EC2 instances

0 votes

I am experiencing quite a strange behaviour with AWS ELB and AWS ASG.

I gave some stress for my server and AWS ASG created 2 EC2 instances to handle the load. Both instances were running on 100% CPU utilisation so AWS ASG created two more - a 3rd and a 4th instance. The thing is that now the 3rd and 4th instances run at 0% CPU utilisation and 1st and 2nd run at ~90% CPU utilisation.

4th instance

3rd instance

2nd instance

1st instance

Why the load between instances is not shared so all of them would be loaded with ~45% CPU utilisation ? Why some instances are maxed and some stay idle?

P.S. My AWS ASG scaling policy :

Execute policy when: As required to maintain Average CPU Utilization at 80

Take the action: Add or remove instances as required

Sep 21, 2018 in AWS by bug_seeker
• 15,350 points
23 views

1 answer to this question.

0 votes

Some quick thoughts:

  • Are your two new instances flagged as Healthy or Unhealthy?
  • Are your two new instances within availability zones that the ALB can route to? Your ALB might be set to span two AZs whereas your ASG might span 3.
  • Are your two new instances in the correct subnets to receive traffic from the ALB?
  • Are your EC2s configured with the same security groups as the two live ones?
  • Is whatever service that should be running on the new instances actually running on it?
answered Sep 21, 2018 by Priyaj
• 56,920 points

Related Questions In AWS

0 votes
1 answer

AWS:Using S3 with EC2 instances

Yes, it can be used for instances ...READ MORE

answered Jun 26, 2018 in AWS by hemant
• 5,750 points
444 views
0 votes
1 answer

Backup solutions for AWS EC2 instances

I've been using Skeddly for several months now to ...READ MORE

answered Sep 12, 2018 in AWS by Priyaj
• 56,920 points
42 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

AWS EC2 Free Tier- how many instances can i run?

Amazon has a handy page that details ...READ MORE

answered Jul 6, 2018 in AWS by Priyaj
• 56,920 points
462 views
0 votes
1 answer