0

ok i have an application that creates PDF from a flat file that is provided by the client... the flat file has about 1 million records

i have an ec2 micro which just has my user interface.At a time the client's flat file is uploaded by the client it now requires more computing power is it possible to add a c4.x4large instance to my current running instance by the method of auto scaling

the c4.x4large instance should start and stop automatically ..i only require it when compute is needed else it has to be stopped

iv have managed to do this using 2 instances mentioned above a bucket and a lambda function

but i want to know is this possible with auto scaling ? if so how

Reuben Gomes
  • 103
  • 2

1 Answers1

1

An AutoScaling Group requires a Launch Configuration.

A Launch Configuration defines the properties of the instances in the ASG.

You can define Scaling Policies based one Cloudwatch metrics. (eg. CPU %, MEM % etc).

When an ASG scales up, it spawns new instances based on the attached Launch Configuration. So all instances in the group are identical, it's NOT possible to have instances with different instance types in the same group.

Chris Lam
  • 283
  • 1
  • 9
  • damn so ill have to use lambda to do this thanks alot :) – Reuben Gomes Jul 03 '17 at 09:47
  • 1 more thing assume i have a scaling group of c4.4xlarge which can scaleup to 3 instances will each one run its own instance or will i get more compute to my 1st instance... basically my ami are setup to run my code when it initializes(grabs a file from the bucket) and processing the pdf files takes about 5hrs on a c4.4x at 75% usage so will when a new instance is added at 60% trigger will it again start processing from start on the new instnace? – Reuben Gomes Jul 03 '17 at 09:59
  • You need an ELB to distribute the requests. It uses least outstanding requests routing algorithm. http://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/how-elastic-load-balancing-works.html#request-routing – Chris Lam Jul 03 '17 at 10:05