반응형
AWS Gamelift - role 설정
AWS 연동
aws configure
최소개수 / 타겟개수 / 최대개수 (변수 : fleetid, regionid)
aws gamelift update-fleet-capacity \
--fleet-id "${fleetid}" \
--desired-instances 1 \
--min-size 1 \
--max-size 25 \
--region "${regionid}"
'사용가능한 게임 세션'이 80% 이상이면 서버 1개 줄이는 role
aws gamelift put-scaling-policy \
--fleet-id "${fleetid}" \
--name "Scale in when AGS>80" \
--policy-type RuleBased \
--metric-name PercentAvailableGameSessions \
--comparison-operator GreaterThanThreshold \
--threshold 80 \
--evaluation-periods 5 \
--scaling-adjustment-type ChangeInCapacity \
--scaling-adjustment -1 \
--region "${regionid}"
'사용가능한 게임 세션'이 50% 이하면 서버 2개 늘이는 role
aws gamelift put-scaling-policy \
--fleet-id "${fleetid}" \
--name "Scale out when AGS<50" \
--policy-type RuleBased \
--metric-name PercentAvailableGameSessions \
--comparison-operator LessThanThreshold \
--threshold 50 \
--evaluation-periods 1 \
--scaling-adjustment-type ChangeInCapacity \
--scaling-adjustment 2 \
--region "${regionid}"
policy 삭제
aws gamelift delete-scaling-policy \
--fleet-id "${fleetid}" \
--name "Scale out when AGS<50" \
--region "${regionid}"
#18acef
■ Reference
내용 | URL | |
rule 가이드 | https://docs.aws.amazon.com/ko_kr/gamelift/latest/developerguide/fleets-autoscaling-rule.html | |
- | - |
by mkdir-chandler
728x90
반응형
'Ops > AWS' 카테고리의 다른 글
AWS IAM - user 신규 생성 가이드 (0) | 2023.08.13 |
---|---|
AWS Gamelift - policy (gamesessionplacement) (0) | 2023.08.10 |
AWS Gamelift - instance ssh 접속 code (bash) (0) | 2023.08.06 |
AWS Gamelift - instance ssh 접속 방법 (0) | 2023.08.05 |
AWS Gamelift - build upload script (bash) (0) | 2023.08.04 |