Reputation: 37
I have a situation where I have kept 2 fixed instances behind an ELB and setup an auto scaling with minimum instances as 0. This is because these 2 instances have some additional applications besides the core website which is being served by the AMI being in setup auto scaling launch configuration - the reason being - in most cases these 2 instances can manage the loads as well as help with additional applications which I do not want in other new instances during peak hours (which auto scaling will load - I guess).
My questions are -
1) Is this setup OK? the auto scaling is configured with the same ELB - however would it scale out when current 2 instances (not part of auto scaling) will reach the event level (>70% CPU)?
2) These 2 instances are termination protection enabled. Would auto scaling not touch them during scale in as they were not created by auto scaling?
Upvotes: 0
Views: 323
Reputation: 1686
I'm not sure re: termination protection/setting up when to scale down, but best practise would indicate setting up autoscaling minimum size of 2, and having your two instances as part of that ASG.
Upvotes: 0
Reputation: 36053
An ELB can have any number of EC2 instances behind it. Those instances can be controlled by Auto Scaling or by your own creating/termination. Elastic Load Balancing won't care which are which. There is no "proper" mix.
Auto Scaling will not affect your 2 individual EC2 instances, termination protection or not. Auto Scaling will only terminate EC2 instances that it created itself.
Also, Auto Scaling will not take input from your 2 EC2 instances automatically. You can probably hook metrics from them to scale your Auto Scaling group up/down, but it won't happen automatically just because they are behind the same ELB.
Upvotes: 1