Reputation: 10366
I'm trying to wrap my head around auto scaling groups. I understand how it would work for web servers and there are a ton of examples to follow. What I'm looking for are examples where you would have let's say a cluster of web servers and Spark workers. Would I group the webs and Spark workers into the same ASG or would they be in different groups?
There doesn't seem to be any examples showing different resources within a ASG. Is that because you wouldn't put other "resources" within one like a database server?
Upvotes: 0
Views: 764
Reputation: 391
There will be two different autoscaling groups one for webs and Spark workers as autoscaling works on the basis of a launch configuration where you will be specifying some events/metric on which it will scale-up or scale down and some AMI to be used.
In one autoscaling group you cannot use two different AMIs.
Upvotes: 1
Reputation: 269121
AWS Auto Scaling groups can launch new Amazon EC2 instances and can terminate instances. You have complete control over defining the parameters for what is launched, such as specifying the AMI and the User Data startup script.
So, you can use it for anything as long as you can configure the instances to do their job after being launched. Each Auto Scaling group launches exactly the same instances, so if you want different types of instances (eg web servers vs app servers), you would use separate Auto Scaling groups.
For Spark, you might instead consider using Amazon EMR, which can scale clusters of servers for Hadoop and Spark.
Upvotes: 2