Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using user defined parameters to control auto-scaling of AWS ELB instances

We have an application which is deployed on AWS ELB.

Currently, auto-scaling is configured to use the aggregate CPU across the ELB instances to automatically add / remove ELB instances.

However, it would be more accurate if we could interrogate the queue lengths on the RabbitMQ instance which is accessed by the ELB instances. Then scale up / down when the queue lengths exceed a threshold.

Is there any way of configuring ELBs to introduce new parameters which could be derived from, for arguments sake, a web service call, which could then be used to control auto-scaling?

Or, do we have to just bite the bullet, and develop our own auto-scaler?

like image 400
Atonewell Avatar asked Jan 04 '12 22:01

Atonewell


People also ask

What is Auto Scaling How do you configure Auto Scaling feature using AWS console?

AWS Auto Scaling lets you build scaling plans that automate how groups of different resources respond to changes in demand. You can optimize availability, costs, or a balance of both. AWS Auto Scaling automatically creates all of the scaling policies and sets targets for you based on your preference.

Does ELB Auto scale?

Hence, ELB distributes the traffic among the instances, cloud watch triggers the Auto Scaling whenever the scaling of instances is to be done and as result, Auto Scaling performs the scaling to ensure the availability of right no. of instances.

How does AWS Elastic Load Balancing handle Auto Scaling?

Elastic Load Balancing works with Amazon EC2 Auto Scaling to distribute incoming traffic across your healthy Amazon EC2 instances. This increases the scalability and availability of your application.

How does Auto Scaling work with load balancer?

To use Elastic Load Balancing with your Auto Scaling group, attach the load balancer to your Auto Scaling group. This registers the group with the load balancer, which acts as a single point of contact for all incoming web traffic to your Auto Scaling group.


1 Answers

Auto Scaling is based on Amazon CloudWatch metrics. CloudWatch initially provided predefined metrics only, but meanwhile custom metrics can be managed as well.

Consequently you can implement your scenario by publishing a custom CloudWatch metric tracking the queue lengths of the RabbitMQ instance in question and scale up / down according to an arbitrary scaling policy based on a respective CloudWatch Alarm monitoring this metric.

like image 71
Steffen Opel Avatar answered Sep 29 '22 07:09

Steffen Opel