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?
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With