CPU 로드 증가시 Auto Scaling 테스트를 위해서 EC2 instance 에 CPU 부하 테스트 및 확인 방법입니다.
1. stress utility on Amazon Linux 2 패키지 설치
https://gist.github.com/mikepfeiffer/d27f5c478bef92e8aff4241154b77e54
Install Stress Utility on Amazon Linux 2
Install Stress Utility on Amazon Linux 2. GitHub Gist: instantly share code, notes, and snippets.
gist.github.com
sudo amazon-linux-extras install epel -y
sudo yum install stress -y

2. stress 테스트 수행
stress -c 4

3. CloudWatch에서 CPU 사용량 경고 확인

4. Auto Scaling 그룹 활동 확인시 ALARM으로 인해서 EC2 instance가 새로 생성 확인이 가능합니다.

'Back-End > AWS' 카테고리의 다른 글
[AWS] High Availability and Scalability for EC2 정리 (0) | 2021.07.24 |
---|---|
[AWS] AWS 자격증 영어 시험 추가 시간 배정 방법 (0) | 2021.07.17 |