Triggering Auto-Scaling by Manually Hitting CPU% Max-Limit 馃挕
Written by Sivaranjan
Ensuring your AWS instance can handle high traffic is crucial. One way to test auto-scaling is by manually increasing CPU utilization to hit the max limit, prompting AWS to scale.
Solution
To simulate high CPU usage for testing:
Install stress tool:
Bash
sudo yum install stress
Run stress to max out CPU:
Bash
stress --cpu <number_of_cores> --timeout <duration_in_seconds>
This will increase CPU utilization, triggering auto-scaling to match the desired instance count. 馃殌
Example
Bash
stress --cpu 4 --timeout 600
This stresses 4 CPU cores for 600 seconds, testing your auto-scaling configuration. Happy testing! 馃搱.
#CloudComputing #AWS #AutoScaling #DevOps
聽