SlideShare a Scribd company logo
AWS와 부하 테스트의
절묘한 만남
김무현, AWS 솔루션즈 아키텍트
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
런치 준비
완료?
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
부하 테스트 사전 수행
아니면
서비스 런치 후
초조하게 기도하기?
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
부하 테스트에 대해서
살펴봅시다.
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
부하 테스트란 무엇일까요?
소프트웨어 시스템 또는 컴퓨팅 장치에 요청을 보내고
응답을 측정하는 테스트 방법
부하 테스트를 통해서 …
• 현재 서비스 구성의 제한(limit)을 찾기
• 원하는 부하를 수용할 수 있게끔 구성되었는지 확인
• 병목 지점을 찾고 병목 현상을 제거
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
부하 테스트 (Load Test)(1)
소프트웨어 시스템에 요청을 보내서
응답을 측정하는 절차
• to determine a system's behavior under both
normal and anticipated peak load conditions
• to identify the maximum operating capacity of an
application as well as any bottlenecks and
determine which element is causing degradation
부하 테스트와 스트레스 테스트
스트레스 테스트 (Stress Test)(2)
시스템의 안정성을 결정하기 위해서
수행되는 의도적인 심한 테스트. 일반적인
운영 용량을 넘은 테스트를 수행하여
결과를 관찰함
• to determine breaking points or safe usage limits
• to confirm mathematical model is accurate enough in
predicting breaking points or safe usage limits
• to confirm intended specifications are being met
• to determine modes of failure (how exactly a system
fails)
• to test stable operation of a part or system outside
standard usage(1) 출처: https://en.wikipedia.org/wiki/Load_testing
(2) 출처: https://en.wikipedia.org/wiki/Stress_testing
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
부하 테스트 수행전에 고려해야할 내용들
• 충분한 테스트용 서버 자원 확보
• 테스트 시, 블랙박스 혹은 격리된 환경 제어
• 글로벌 기반의 부하 생성
• 높은 비용과 불규칙적인 사용성에 대한 주의
• 높은 아키텍처 복잡성에 대한 주의
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS와 부하 테스트의
조합은 어떨까요?
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS 클라우드 기반의 부하 테스트의 장점
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS 클라우드 기반의 부하 테스트의 장점
효율적인 비용 • 테스트 조건에 맞는 인스턴스 사용
• 워밍업 테스트에는 작은 인스턴스 사용
• 테스트 종료 후, 자원 반환
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS 클라우드 기반의 부하 테스트의 장점
충분하고 유연한
자원
• 필요한 규모의 테스트 자원 확보 가능
• 오토스케일팅을 통한 부하 테스트시 자원 자동 증가 및
감소
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS 클라우드 기반의 부하 테스트의 장점
글로벌 리전
활용
• 전 세계 리전을 활용한 부하 테스트 수행
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS 클라우드 기반의 부하 테스트의 장점
쉽고 단순한
아키텍처
구성 및 관리
• CloudFormation을 이용한 동일한 운영, 테스트 환경의
손쉬운 구성
• 관리형 서비스, Serverless 서비스를 이용한 부하 테스트
환경 운영 간소화 및 단순화
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
부하 테스트 수행은 어떻게
하는지 알아봅시다
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
단계별로 수행하는 부하 테스트
• 비결합(Loosely Coupled)된 개별 컴포넌트에 대한 부하
테스트
• 내부 서비스에 대한 부하 테스트
• 외부 서비스에 대한 부하 테스트
• 전체 스택에 대해 부하 테스트
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Public Subnet
Master
Database
Internal Services Servers
Private
Subnet
Load Test
Scripts
Metrics
Collection &
Graphing
Load
Generators
Private or
Public Subnet
AWS에 있는 컴포넌트 및 서비스 테스트
• 같은 VPC에 부하
테스트 구성
• JMeter를 이용한 DB
성능 테스트
• ORM 부하 확인
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• DirectConnect 또는
VPN 성능 검증
• AWS에 Cache 또는
Proxy cache가
필요한지 확인
• IP 주소가 겹치지
않도록
데이터센터에 있는 서비스 테스트
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
외부 서비스에 대한 부하 테스트
External
APIs
Internet
Load Test
Scripts
Region 1
Metrics
Collection &
Graphing
Load
GeneratorsLoad Test
Scripts
Region 2
Metrics
Collection &
Graphing
Load
Generators
Load Test
Scripts
Region 3
Metrics
Collection &
Graphing
Load
Generators
부하 테스트
수행 전에
외부 서비스에
공지가
필요한지
확인하자
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
전체 스택에 대해 부하 테스트
• 전체 게임 플레이 세션을 시뮬레이션
• 다양한 지역에서 테스트 수행
• 전체 인프라에 대한 전체적인 뷰
• 파이프라인상에서 병목 확인
• 오토-스케일링 정책을 세우는데 도움을 줌
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
전체 스택에 대해 부하 테스트
Corporate Data Center
Load Test
Deployment
External
APIs
Internet
Internet
Direct
Connect
Load Test
Scripts
region
Metrics
Collection &
Graphing
Load
Generators
region
region
Internet
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
전체 스택에 대해 부하 테스트 어떻게 이뤄지나요?
Developers
Developers
Developers
Load Test
Deployment
S3
Bucket
Developer
Workstation
Small Load
Test to Verify
Scripts
Upload
Finished Test
Scenarios to
S3
Download
Scenarios
Upload Raw
Results &
Aggregates
Full Scale
Load Testing
EMR +
RedShift,
Graphite or
Splunk et al.
Configuration
Management
Server
Pushes
Configuration
Code
Repository
Load Test Stack
Send Data
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
3-티어에 대한 부하 테스트
전략
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
3-티어에 대한 부하 테스트 수행
1. 최초 ‘WEB’ 을 출력하는 웹
페이지를 대상으로 동시
연결성에 대한 테스트 수행
2. 결과 평가
3. 최적화 진행
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
3-티어에 대한 부하 테스트 수행
1. 웹 서버를 통해 애플리케이션
서버에서 넘겨 받은
‘APPLICATION’ 을 출력하는
웹 페이지를 대상으로 동시
연결성에 대한 테스트 수행
2. 결과 평가
3. 최적화 진행
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
3-티어에 대한 부하 테스트 수행
1. 데이터베이스에서 최소한의
쿼리 결과를 전달 받아
출력하는 웹 페이지를
대상으로 동시 연결성에 대한
테스트 수행
2. 결과 평가
3. 최적화 진행
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
3-티어에 대한 부하 테스트 수행
1. 3-tier 스택 전체를 대상으로
애플리케이션 로직이 적용된
페이지에 동시 연결성에 대한
테스트 수행
2. 결과 평가
3. 최적화 진행
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
3-티어에 대한 부하 테스트 수행
1. 4번을 기반으로 다양한
시나리오를 지정하여 테스트
수행
2. (얻고자 하는 지표 기준에
대해서) 결과 평과
3. 최적화 진행
시나리오별 테스트를 해야죠!
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
각 레이어별로는 어떤 것을
고려해야할까요?
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
각 레이어별 고려사항
• 네트워크 용량 확인
• 부하 생성 클라이언트
• 로드 밸런싱
(Elastic Load Balancing)
• 서버 인스턴스
• 어플리케이션 서버
• 어플리케이션
• 데이터베이스
아웃바운드 연결에 예상되는 최대
부하를 처리가능한지?
• EC2 인스턴스 타입 – Enhanced
Networking
• VPN 네트워크 성능 등
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
각 레이어별 고려사항
• 네트워크 용량 확인
• 부하 생성 클라이언트
• 로드 밸런싱
(Elastic Load Balancing)
• 서버 인스턴스
• 어플리케이션 서버
• 어플리케이션
• 데이터베이스
• 원하는 부하양을 생성할 수 있는
충분한 인스턴스 확보
• 부하 생성 클라이언트 특징
확인필요
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
각 레이어별 고려사항
• 네트워크 용량 확인
• 부하 생성 클라이언트
• 로드 밸런싱
(Elastic Load Balancing)
• 서버 인스턴스
• 어플리케이션 서버
• 어플리케이션
• 데이터베이스
• Backend / Target 인스턴스들이
요구량 증가에 신속하게 대응
가능한지 (Auto Scaling)
• 급격한 부하 증가 시나리오인 경우,
사전 ELB 확장
• Keep-Alive 설정을 통한 불필요한
연결 재수립 방지
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
각 레이어별 고려사항
• 네트워크 용량 확인
• 부하 생성 클라이언트
• 로드 밸런싱
(Elastic Load Balancing)
• 서버 인스턴스
• 어플리케이션 서버
• 어플리케이션
• 데이터베이스
• 서버 성능 최적화
• Open Files Limit
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
각 레이어별 고려사항
• 네트워크 용량 확인
• 부하 생성 클라이언트
• 로드 밸런싱
(Elastic Load Balancing)
• 서버 인스턴스
• 어플리케이션 서버
• 어플리케이션
• 데이터베이스
• Thread 기반인 경우 Thread Pool
크기가 적당한지
• Event 기반 비동기 형태의
어플리케이션 서버 사용
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
각 레이어별 고려사항
• 네트워크 용량 확인
• 부하 생성 클라이언트
• 로드 밸런싱
(Elastic Load Balancing)
• 서버 인스턴스
• 어플리케이션 서버
• 어플리케이션
• 데이터베이스
어플리케이션 코드 – Unit 테스트, Lint
• 잘못된 방식의 프레임워크, API
사용
• Blocking 코드
• 불필요한 연산 또는 테스트 코드
어플리케이션 프레임워크
• 웹 프레임워크나 ORM(Object-
relational mapping) 라이브러리
오류
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
각 레이어별 고려사항
• 네트워크 용량 확인
• 부하 생성 클라이언트
• 로드 밸런싱
(Elastic Load Balancing)
• 서버 인스턴스
• 어플리케이션 서버
• 어플리케이션
• 데이터베이스
• CPU 사용률과 응답 시간 확인
• 설정에 따라 더 요구되는 자원이
있는지 점검
• 메모리 사용률 확인
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
꼭 알아야할 팁
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
부하테스트 시 유용한 팁 모음
• 가능한 모든 것을 자동화
• 로그 기록과 확인
• 적절한 인스턴스의 선택
• 비용 최소화
• 다양한 도구와 서비스의 복합적 활용
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
그러면 부하 테스트를 위한
도구들은 어떤것이 있을까요
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
부하 테스트 도구들
EC2
설치형
서비스형
AWS
활용형
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
부하 테스트 도구들
EC2
설치형
Grinder
• Agent 기반 부하 생성
• Thread 기반 구현으로 성능, 동시성에 제한이 있음
Gatling
• Akka와 Netty 기반의 Scala로 구현된 부하 테스트 프레임워크
• Async IO 기반으로 높은 성능 제공
• 시나리오 DSL 작성
Tsung
• HTTP, Websocket, 인증시스템, 데이터베이스, MQTT 등 TCP 기반의
다양한 프로토콜
Vegeta
• HTTP 부하 테스트
• 초당 일정한 속도록 특정 수치의 요청을 지속
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
부하 테스트 도구들
EC2
설치형
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
부하 테스트 도구들
RedLine13
• AWS Advanced Technology Partner
• 부하 테스트 수행 서비스 제공
• AWS IAM 계정을 이용한 Agent 설치
• 스팟 인스턴스 활용을 통한 비용 절감
• JMeter, Gatling, Python, PHP 및 NodeJS 지원
서비스형
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
부하 테스트 도구들
RedLine13
서비스형
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
부하 테스트 도구들
Loader.io
• 클라우드 기반의 부하테스트 서비스
• 대상 서버 지정, 원하는 동시성 지정 등
• 테스트 리플레이 가능
서비스형
출처: loader.io
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
부하 테스트 도구들
Bees with Machine Guns
• EC2 인스턴스를 지정한 개수만큼 생성해서 부하 테스트 수행
• 스팟 인스턴스 활용 옵션
• ApacheBench 기반 (hurl 사용 가능)
AWS
활용형
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
부하 테스트 도구들
Goad
• AWS Lambda를 이용한 분산 부하 테스트
• 대상 URL에 부하 테스트 수행 후, AWS SQS를 통한 결과 취합
AWS
활용형
Amazon SQS
$ goad λ 수행
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
부하 테스트 도구 선택은?
도구 명 활용 방법
JMeter 웹 애플리케이션 내에서 사용자의 행동 흐름에 대해 부하 테스트를 하고 싶을 때
Tsung API 가 수용할 수 있는 최대치의 부하를 알고 싶을 때
Vegeta
어떤 API 에 대해 초당 특정 수치의 요청이 지속될 경우 발생하는 상황을 파악하고
싶을 때
Goad 부하 생성 클라이언트 구성을 포함한 부하 테스트 관련 인프라 구성을 피하고 싶을 때
RedLine13
JMeter 로 테스트 플랜을 작성하여 활용을 원하지만, 비용을 최소화 하고 싶고 사용한
만큼만 비용이 발생하길 원할 때
Blazemeter
높은 동시성을 위해 JMeter 의 Remote Testing 기능을 활용하고 싶지만, 테스트 플랜
작성에 집중하고, 부하 테스트 관련 인프라 구성은 하고 싶지 않을 때
Loader.io
부하 테스트 관련 인프라 구성을 하고 싶지 않고, Tsung 과 비슷한 목적으로 사용하고
싶을 때
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
데모 1
AWS EC2 자동 구성
Bees with Machine Guns!
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Bees with Machine Guns
$ bees up $ bees attack $ bees down
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Bees with Machine Guns
$ bees up
EC2 on-demand 또는 Spot
리전 및 가용영역
인스턴스 타입
인스턴스 개수
AMI
서브넷
보안 그룹
SSH 키
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Bees with Machine Guns
$ bees up -s 2 -g default -z ap-northeast-1a -k aws-nrt-key -i ami-3e42b65f
New bees will use the "default" EC2 security group. Please note that port 22
(SSH) is not normally open on this group. You will need to use to the EC2
tools to open it before you will be able to attack.
Connecting to the hive.
Attempting to call up 2 bees.
Waiting for bees to load their machine guns...
.
Bee i-d73c2348 is ready for the attack
Bee i-d43c234b is ready for the attack.
The swarm has assembled 2 bees.
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Bees with Machine Guns
$ bees attack
테스트 대상 URL
총 요청 개수
동시 요청 개수
테스트 수행 시간
최소 RPS (Request Per Second)
요청 VERB (GET, PUT, …)
Hurl을 사용하는 경우 추가 설정
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Bees with Machine Guns
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Bees with Machine Guns
$ bees down
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
데모 2
AWS Lambda 기반의 부하
테스트툴 Goad 데모
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
GO + LOAD  Goad (https://goad.io)
“Goad is an AWS Lambda powered, highly distributed,
load testing tool built in Go for the 2016 Gopher Gala.”
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
GO + LOAD  Goad
var execFile = require("child_process").execFile;
exports.handler = function(event, context) {
child = execFile(event.file, event.args, function(error) {
context.done(error, "Process complete!");
});
child.stdout.on("data", console.log);
child.stderr.on("data", console.error);
};
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
GO + LOAD  Goad
$ goad –c 30 –m GET –n 10000 –u http://wordpress….northeast.2.elb.amazonaws.com/wordpress/
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
GO + LOAD  Goad
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
마지막으로 다시
강조하자면 AWS를 이용한
부하 테스트는 …
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
효율적인 비용
충분하고 유연한
자원
글로벌 리전
활용
쉽고 단순한
아키텍처
구성 및 관리
감사합니다
AWS와 부하테스트의 절묘한 만남 :: 김무현 솔루션즈 아키텍트 :: Gaming on AWS 2016

More Related Content

PDF
실전 서버 부하테스트 노하우
PDF
AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017
PDF
CloudWatch 성능 모니터링과 신속한 대응을 위한 노하우 - 박선용 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming
PDF
게임사를 위한 Amazon GameLift 세션 - 이정훈, AWS 솔루션즈 아키텍트
PDF
잘 키운 모노리스 하나 열 마이크로서비스 안 부럽다
PDF
PUBG: Battlegrounds 라이브 서비스 EKS 전환 사례 공유 [크래프톤 - 레벨 300] - 발표자: 김정헌, PUBG Dev...
PDF
AWS DirectConnect 구성 가이드 (김용우) - 파트너 웨비나 시리즈
PDF
대용량 데이터베이스의 클라우드 네이티브 DB로 전환 시 확인해야 하는 체크 포인트-김지훈, AWS Database Specialist SA...
실전 서버 부하테스트 노하우
AWS 고객이 주로 겪는 운영 이슈에 대한 해법-AWS Summit Seoul 2017
CloudWatch 성능 모니터링과 신속한 대응을 위한 노하우 - 박선용 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming
게임사를 위한 Amazon GameLift 세션 - 이정훈, AWS 솔루션즈 아키텍트
잘 키운 모노리스 하나 열 마이크로서비스 안 부럽다
PUBG: Battlegrounds 라이브 서비스 EKS 전환 사례 공유 [크래프톤 - 레벨 300] - 발표자: 김정헌, PUBG Dev...
AWS DirectConnect 구성 가이드 (김용우) - 파트너 웨비나 시리즈
대용량 데이터베이스의 클라우드 네이티브 DB로 전환 시 확인해야 하는 체크 포인트-김지훈, AWS Database Specialist SA...

What's hot (20)

PPTX
AWS 기반 대규모 트래픽 견디기 - 장준엽 (구로디지털 모임) :: AWS Community Day 2017
PDF
Amazon Redshift로 데이터웨어하우스(DW) 구축하기
PDF
AWS 기반 클라우드 아키텍처 모범사례 - 삼성전자 개발자 포털/개발자 워크스페이스 - 정영준 솔루션즈 아키텍트, AWS / 유현성 수석,...
PDF
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
PDF
마이크로서비스 기반 클라우드 아키텍처 구성 모범 사례 - 윤석찬 (AWS 테크에반젤리스트)
PDF
쿠키런: 킹덤 대규모 인프라 및 서버 운영 사례 공유 [데브시스터즈 - 레벨 200] - 발표자: 용찬호, R&D 엔지니어, 데브시스터즈 ...
PDF
Amazon DynamoDB 키 디자인 패턴
PDF
웹서버 부하테스트 실전 노하우
PDF
Amazon RDS Proxy 집중 탐구 - 윤석찬 :: AWS Unboxing 온라인 세미나
PDF
Amazon DocumentDB vs MongoDB 의 내부 아키텍쳐 와 장단점 비교
PDF
AWS 클라우드 비용 최적화를 위한 TIP - 임성은 AWS 매니저
PDF
Naver속도의, 속도에 의한, 속도를 위한 몽고DB (네이버 컨텐츠검색과 몽고DB) [Naver]
PDF
AWS 클라우드 기반 게임 아키텍처 사례 - AWS Summit Seoul 2017
PPT
10월 웨비나 - AWS에서 Active Directory 구축 및 연동 옵션 살펴보기 (김용우 솔루션즈 아키텍트)
PDF
AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20
PPTX
글로벌 기업들의 효과적인 데이터 분석을 위한 Data Lake 구축 및 분석 사례 - 김준형 (AWS 솔루션즈 아키텍트)
PDF
이벤트 기반 분산 시스템을 향한 여정
PDF
AWS Batch를 통한 손쉬운 일괄 처리 작업 관리하기 - 윤석찬 (AWS 테크에반젤리스트)
ODP
Kong API Gateway
PDF
서버리스 앱 배포 자동화 (김필중, AWS 솔루션즈 아키텍트) :: AWS DevDay2018
AWS 기반 대규모 트래픽 견디기 - 장준엽 (구로디지털 모임) :: AWS Community Day 2017
Amazon Redshift로 데이터웨어하우스(DW) 구축하기
AWS 기반 클라우드 아키텍처 모범사례 - 삼성전자 개발자 포털/개발자 워크스페이스 - 정영준 솔루션즈 아키텍트, AWS / 유현성 수석,...
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
마이크로서비스 기반 클라우드 아키텍처 구성 모범 사례 - 윤석찬 (AWS 테크에반젤리스트)
쿠키런: 킹덤 대규모 인프라 및 서버 운영 사례 공유 [데브시스터즈 - 레벨 200] - 발표자: 용찬호, R&D 엔지니어, 데브시스터즈 ...
Amazon DynamoDB 키 디자인 패턴
웹서버 부하테스트 실전 노하우
Amazon RDS Proxy 집중 탐구 - 윤석찬 :: AWS Unboxing 온라인 세미나
Amazon DocumentDB vs MongoDB 의 내부 아키텍쳐 와 장단점 비교
AWS 클라우드 비용 최적화를 위한 TIP - 임성은 AWS 매니저
Naver속도의, 속도에 의한, 속도를 위한 몽고DB (네이버 컨텐츠검색과 몽고DB) [Naver]
AWS 클라우드 기반 게임 아키텍처 사례 - AWS Summit Seoul 2017
10월 웨비나 - AWS에서 Active Directory 구축 및 연동 옵션 살펴보기 (김용우 솔루션즈 아키텍트)
AWS 기반의 마이크로 서비스 아키텍쳐 구현 방안 :: 김필중 :: AWS Summit Seoul 20
글로벌 기업들의 효과적인 데이터 분석을 위한 Data Lake 구축 및 분석 사례 - 김준형 (AWS 솔루션즈 아키텍트)
이벤트 기반 분산 시스템을 향한 여정
AWS Batch를 통한 손쉬운 일괄 처리 작업 관리하기 - 윤석찬 (AWS 테크에반젤리스트)
Kong API Gateway
서버리스 앱 배포 자동화 (김필중, AWS 솔루션즈 아키텍트) :: AWS DevDay2018
Ad

Viewers also liked (10)

PDF
Load testing with gatling
PDF
Rest api 테스트 수행가이드
PDF
이미지 기반의 배포 패러다임 Immutable infrastructure
PDF
AWS Summit Seoul 2015 - 국내 사례로 본 클라우드 운영 최적화 (이주완-메가존)
PDF
AWS CLOUD 2017 - 서울 리전 개설 1년, 고객 관점 모범 아키텍처 설계 전략 (양승도 솔루션즈 아키텍트)
PDF
AWS 주요 기능 업데이트 - 2016년 1월/2월 (김용우) - 파트너 웨비나 시리즈
PDF
AWS 서울 리전(Region) 서비스 소개- 김용우 솔루션즈 아키텍트:: AWS Cloud Track 2 Advanced
PDF
AWS CLOUD 2017 - AWS 신규 서비스를 통해 본 클라우드의 미래 (김봉환 솔루션즈 아키텍트)
PDF
AWS 클라우드 이해하기-사례 중심으로 - 정민정 매니저:: AWS Cloud Track 1 Intro
PDF
AWS 클라우드 이해하기-사례 중심 (정민정) - AWS 웨비나 시리즈
Load testing with gatling
Rest api 테스트 수행가이드
이미지 기반의 배포 패러다임 Immutable infrastructure
AWS Summit Seoul 2015 - 국내 사례로 본 클라우드 운영 최적화 (이주완-메가존)
AWS CLOUD 2017 - 서울 리전 개설 1년, 고객 관점 모범 아키텍처 설계 전략 (양승도 솔루션즈 아키텍트)
AWS 주요 기능 업데이트 - 2016년 1월/2월 (김용우) - 파트너 웨비나 시리즈
AWS 서울 리전(Region) 서비스 소개- 김용우 솔루션즈 아키텍트:: AWS Cloud Track 2 Advanced
AWS CLOUD 2017 - AWS 신규 서비스를 통해 본 클라우드의 미래 (김봉환 솔루션즈 아키텍트)
AWS 클라우드 이해하기-사례 중심으로 - 정민정 매니저:: AWS Cloud Track 1 Intro
AWS 클라우드 이해하기-사례 중심 (정민정) - AWS 웨비나 시리즈
Ad

Similar to AWS와 부하테스트의 절묘한 만남 :: 김무현 솔루션즈 아키텍트 :: Gaming on AWS 2016 (20)

PDF
[AWSome Day온라인 컨퍼런스] 강의 3: 클라우드 구축하기 - 정도현, AWS 테크니컬 트레이너
PDF
클라우드에서 구축하기 - 정도현, AWS 테크니컬 트레이너 :: AWSome Day 온라인 컨퍼런스
PDF
클라우드 네이티브 환경에 맞는 IT 운영 원칙과 모범사례 - 권신중 솔루션즈 아키텍트, AWS :: AWS Summit Seoul 2019
PDF
On-Premise 기반서비스 클라우드 전환기 -DevSecOps 도입을통한 유연한 서비스 개발 및 운영::박준상::AWS Summit S...
PDF
On-Premise 기반서비스 클라우드 전환기 -DevSecOps 도입을통한 유연한 서비스 개발 및 운영::박준상::AWS Summit S...
PDF
강의 1: AWS 클라우드 개념:: AWSome Day Online Conference
PDF
[Games on AWS 2019] AWS 사용자를 위한 만랩 달성 트랙 | AWS 최적화 사용을 위해 운영자가 아닌 개발자들이 해야 할 ...
PDF
AWS와 함께하는 클라우드 컴퓨팅 (강철 AWS 매니저) :: AWS 기초 교육 온라인 세미나
PPTX
AWS 의 비용 절감 프레임워크와 신규 프로그램을 활용한 전략적 비용절감 :: AWS Travel and Transportation 온라인...
PDF
AWS 신규 보안 서비스 - WAF. Inspector 등 (김용우) :: re:Invent re:Cap Webinar 2015
PDF
강의 4: AWS 아키텍처 설계:: AWSome Day Online Conference
PDF
Cloud Native Aurora Serverless를 통한 Data Lake 구축 - 최유정 솔루션즈 아키텍트, AWS
PDF
천만 사용자를 위한 AWS 클라우드 아키텍처 진화하기::이창수::AWS Summit Seoul 2018
PDF
AWS Builders Online Series | EC2와 Lambda로 AWS 시작하기 - 조용진, AWS 솔루션즈 아키텍트
PDF
빠르고 안전하게 간편한 AWS로 데이터 마이그레이션 하기::최유정 (AWS 솔루션즈아키텍트)
PDF
AWS 와 함께하는 클라우드 컴퓨팅:: 방희란 :: AWS Summit Seoul 2016
PDF
[AWS Builders] AWS와 함께하는 클라우드 컴퓨팅
PDF
AWS와 함께하는 클라우드 컴퓨팅 - 강철, AWS 어카운트 매니저 :: AWS Builders 100
PDF
AWS 클라우드 핵심 서비스로 클라우드 기반 아키텍처 빠르게 구성하기 - 문종민 솔루션즈 아키텍트, AWS :: AWS Summit Seo...
PDF
Amazon LightSail을 통한 가상 서버 호스팅 이용하기
[AWSome Day온라인 컨퍼런스] 강의 3: 클라우드 구축하기 - 정도현, AWS 테크니컬 트레이너
클라우드에서 구축하기 - 정도현, AWS 테크니컬 트레이너 :: AWSome Day 온라인 컨퍼런스
클라우드 네이티브 환경에 맞는 IT 운영 원칙과 모범사례 - 권신중 솔루션즈 아키텍트, AWS :: AWS Summit Seoul 2019
On-Premise 기반서비스 클라우드 전환기 -DevSecOps 도입을통한 유연한 서비스 개발 및 운영::박준상::AWS Summit S...
On-Premise 기반서비스 클라우드 전환기 -DevSecOps 도입을통한 유연한 서비스 개발 및 운영::박준상::AWS Summit S...
강의 1: AWS 클라우드 개념:: AWSome Day Online Conference
[Games on AWS 2019] AWS 사용자를 위한 만랩 달성 트랙 | AWS 최적화 사용을 위해 운영자가 아닌 개발자들이 해야 할 ...
AWS와 함께하는 클라우드 컴퓨팅 (강철 AWS 매니저) :: AWS 기초 교육 온라인 세미나
AWS 의 비용 절감 프레임워크와 신규 프로그램을 활용한 전략적 비용절감 :: AWS Travel and Transportation 온라인...
AWS 신규 보안 서비스 - WAF. Inspector 등 (김용우) :: re:Invent re:Cap Webinar 2015
강의 4: AWS 아키텍처 설계:: AWSome Day Online Conference
Cloud Native Aurora Serverless를 통한 Data Lake 구축 - 최유정 솔루션즈 아키텍트, AWS
천만 사용자를 위한 AWS 클라우드 아키텍처 진화하기::이창수::AWS Summit Seoul 2018
AWS Builders Online Series | EC2와 Lambda로 AWS 시작하기 - 조용진, AWS 솔루션즈 아키텍트
빠르고 안전하게 간편한 AWS로 데이터 마이그레이션 하기::최유정 (AWS 솔루션즈아키텍트)
AWS 와 함께하는 클라우드 컴퓨팅:: 방희란 :: AWS Summit Seoul 2016
[AWS Builders] AWS와 함께하는 클라우드 컴퓨팅
AWS와 함께하는 클라우드 컴퓨팅 - 강철, AWS 어카운트 매니저 :: AWS Builders 100
AWS 클라우드 핵심 서비스로 클라우드 기반 아키텍처 빠르게 구성하기 - 문종민 솔루션즈 아키텍트, AWS :: AWS Summit Seo...
Amazon LightSail을 통한 가상 서버 호스팅 이용하기

More from Amazon Web Services Korea (20)

PDF
[D3T1S01] Gen AI를 위한 Amazon Aurora 활용 사례 방법
PDF
[D3T1S06] Neptune Analytics with Vector Similarity Search
PDF
[D3T1S03] Amazon DynamoDB design puzzlers
PDF
[D3T1S04] Aurora PostgreSQL performance monitoring and troubleshooting by use...
PDF
[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기
PDF
[D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기
PDF
[D3T1S02] Aurora Limitless Database Introduction
PDF
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습
PDF
[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
PDF
AWS Modern Infra with Storage Roadshow 2023 - Day 2
PDF
AWS Modern Infra with Storage Roadshow 2023 - Day 1
PDF
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
PDF
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
PDF
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
PDF
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
PDF
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
PDF
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
PDF
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
PDF
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
PDF
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...
[D3T1S01] Gen AI를 위한 Amazon Aurora 활용 사례 방법
[D3T1S06] Neptune Analytics with Vector Similarity Search
[D3T1S03] Amazon DynamoDB design puzzlers
[D3T1S04] Aurora PostgreSQL performance monitoring and troubleshooting by use...
[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기
[D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기
[D3T1S02] Aurora Limitless Database Introduction
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습
[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
AWS Modern Infra with Storage Roadshow 2023 - Day 2
AWS Modern Infra with Storage Roadshow 2023 - Day 1
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...

AWS와 부하테스트의 절묘한 만남 :: 김무현 솔루션즈 아키텍트 :: Gaming on AWS 2016

  • 1. AWS와 부하 테스트의 절묘한 만남 김무현, AWS 솔루션즈 아키텍트
  • 2. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 런치 준비 완료?
  • 3. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 4. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 부하 테스트 사전 수행 아니면 서비스 런치 후 초조하게 기도하기?
  • 5. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 부하 테스트에 대해서 살펴봅시다.
  • 6. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 부하 테스트란 무엇일까요? 소프트웨어 시스템 또는 컴퓨팅 장치에 요청을 보내고 응답을 측정하는 테스트 방법 부하 테스트를 통해서 … • 현재 서비스 구성의 제한(limit)을 찾기 • 원하는 부하를 수용할 수 있게끔 구성되었는지 확인 • 병목 지점을 찾고 병목 현상을 제거
  • 7. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 부하 테스트 (Load Test)(1) 소프트웨어 시스템에 요청을 보내서 응답을 측정하는 절차 • to determine a system's behavior under both normal and anticipated peak load conditions • to identify the maximum operating capacity of an application as well as any bottlenecks and determine which element is causing degradation 부하 테스트와 스트레스 테스트 스트레스 테스트 (Stress Test)(2) 시스템의 안정성을 결정하기 위해서 수행되는 의도적인 심한 테스트. 일반적인 운영 용량을 넘은 테스트를 수행하여 결과를 관찰함 • to determine breaking points or safe usage limits • to confirm mathematical model is accurate enough in predicting breaking points or safe usage limits • to confirm intended specifications are being met • to determine modes of failure (how exactly a system fails) • to test stable operation of a part or system outside standard usage(1) 출처: https://en.wikipedia.org/wiki/Load_testing (2) 출처: https://en.wikipedia.org/wiki/Stress_testing
  • 8. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 부하 테스트 수행전에 고려해야할 내용들 • 충분한 테스트용 서버 자원 확보 • 테스트 시, 블랙박스 혹은 격리된 환경 제어 • 글로벌 기반의 부하 생성 • 높은 비용과 불규칙적인 사용성에 대한 주의 • 높은 아키텍처 복잡성에 대한 주의
  • 9. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS와 부하 테스트의 조합은 어떨까요?
  • 10. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS 클라우드 기반의 부하 테스트의 장점
  • 11. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS 클라우드 기반의 부하 테스트의 장점 효율적인 비용 • 테스트 조건에 맞는 인스턴스 사용 • 워밍업 테스트에는 작은 인스턴스 사용 • 테스트 종료 후, 자원 반환
  • 12. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS 클라우드 기반의 부하 테스트의 장점 충분하고 유연한 자원 • 필요한 규모의 테스트 자원 확보 가능 • 오토스케일팅을 통한 부하 테스트시 자원 자동 증가 및 감소
  • 13. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS 클라우드 기반의 부하 테스트의 장점 글로벌 리전 활용 • 전 세계 리전을 활용한 부하 테스트 수행
  • 14. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS 클라우드 기반의 부하 테스트의 장점 쉽고 단순한 아키텍처 구성 및 관리 • CloudFormation을 이용한 동일한 운영, 테스트 환경의 손쉬운 구성 • 관리형 서비스, Serverless 서비스를 이용한 부하 테스트 환경 운영 간소화 및 단순화
  • 15. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 부하 테스트 수행은 어떻게 하는지 알아봅시다
  • 16. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 단계별로 수행하는 부하 테스트 • 비결합(Loosely Coupled)된 개별 컴포넌트에 대한 부하 테스트 • 내부 서비스에 대한 부하 테스트 • 외부 서비스에 대한 부하 테스트 • 전체 스택에 대해 부하 테스트
  • 17. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Public Subnet Master Database Internal Services Servers Private Subnet Load Test Scripts Metrics Collection & Graphing Load Generators Private or Public Subnet AWS에 있는 컴포넌트 및 서비스 테스트 • 같은 VPC에 부하 테스트 구성 • JMeter를 이용한 DB 성능 테스트 • ORM 부하 확인
  • 18. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. • DirectConnect 또는 VPN 성능 검증 • AWS에 Cache 또는 Proxy cache가 필요한지 확인 • IP 주소가 겹치지 않도록 데이터센터에 있는 서비스 테스트
  • 19. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 외부 서비스에 대한 부하 테스트 External APIs Internet Load Test Scripts Region 1 Metrics Collection & Graphing Load GeneratorsLoad Test Scripts Region 2 Metrics Collection & Graphing Load Generators Load Test Scripts Region 3 Metrics Collection & Graphing Load Generators 부하 테스트 수행 전에 외부 서비스에 공지가 필요한지 확인하자
  • 20. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 전체 스택에 대해 부하 테스트 • 전체 게임 플레이 세션을 시뮬레이션 • 다양한 지역에서 테스트 수행 • 전체 인프라에 대한 전체적인 뷰 • 파이프라인상에서 병목 확인 • 오토-스케일링 정책을 세우는데 도움을 줌
  • 21. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 전체 스택에 대해 부하 테스트 Corporate Data Center Load Test Deployment External APIs Internet Internet Direct Connect Load Test Scripts region Metrics Collection & Graphing Load Generators region region Internet
  • 22. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 전체 스택에 대해 부하 테스트 어떻게 이뤄지나요? Developers Developers Developers Load Test Deployment S3 Bucket Developer Workstation Small Load Test to Verify Scripts Upload Finished Test Scenarios to S3 Download Scenarios Upload Raw Results & Aggregates Full Scale Load Testing EMR + RedShift, Graphite or Splunk et al. Configuration Management Server Pushes Configuration Code Repository Load Test Stack Send Data
  • 23. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 3-티어에 대한 부하 테스트 전략
  • 24. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 3-티어에 대한 부하 테스트 수행 1. 최초 ‘WEB’ 을 출력하는 웹 페이지를 대상으로 동시 연결성에 대한 테스트 수행 2. 결과 평가 3. 최적화 진행
  • 25. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 3-티어에 대한 부하 테스트 수행 1. 웹 서버를 통해 애플리케이션 서버에서 넘겨 받은 ‘APPLICATION’ 을 출력하는 웹 페이지를 대상으로 동시 연결성에 대한 테스트 수행 2. 결과 평가 3. 최적화 진행
  • 26. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 3-티어에 대한 부하 테스트 수행 1. 데이터베이스에서 최소한의 쿼리 결과를 전달 받아 출력하는 웹 페이지를 대상으로 동시 연결성에 대한 테스트 수행 2. 결과 평가 3. 최적화 진행
  • 27. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 3-티어에 대한 부하 테스트 수행 1. 3-tier 스택 전체를 대상으로 애플리케이션 로직이 적용된 페이지에 동시 연결성에 대한 테스트 수행 2. 결과 평가 3. 최적화 진행
  • 28. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 3-티어에 대한 부하 테스트 수행 1. 4번을 기반으로 다양한 시나리오를 지정하여 테스트 수행 2. (얻고자 하는 지표 기준에 대해서) 결과 평과 3. 최적화 진행 시나리오별 테스트를 해야죠!
  • 29. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 각 레이어별로는 어떤 것을 고려해야할까요?
  • 30. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 각 레이어별 고려사항 • 네트워크 용량 확인 • 부하 생성 클라이언트 • 로드 밸런싱 (Elastic Load Balancing) • 서버 인스턴스 • 어플리케이션 서버 • 어플리케이션 • 데이터베이스 아웃바운드 연결에 예상되는 최대 부하를 처리가능한지? • EC2 인스턴스 타입 – Enhanced Networking • VPN 네트워크 성능 등
  • 31. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 각 레이어별 고려사항 • 네트워크 용량 확인 • 부하 생성 클라이언트 • 로드 밸런싱 (Elastic Load Balancing) • 서버 인스턴스 • 어플리케이션 서버 • 어플리케이션 • 데이터베이스 • 원하는 부하양을 생성할 수 있는 충분한 인스턴스 확보 • 부하 생성 클라이언트 특징 확인필요
  • 32. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 각 레이어별 고려사항 • 네트워크 용량 확인 • 부하 생성 클라이언트 • 로드 밸런싱 (Elastic Load Balancing) • 서버 인스턴스 • 어플리케이션 서버 • 어플리케이션 • 데이터베이스 • Backend / Target 인스턴스들이 요구량 증가에 신속하게 대응 가능한지 (Auto Scaling) • 급격한 부하 증가 시나리오인 경우, 사전 ELB 확장 • Keep-Alive 설정을 통한 불필요한 연결 재수립 방지
  • 33. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 각 레이어별 고려사항 • 네트워크 용량 확인 • 부하 생성 클라이언트 • 로드 밸런싱 (Elastic Load Balancing) • 서버 인스턴스 • 어플리케이션 서버 • 어플리케이션 • 데이터베이스 • 서버 성능 최적화 • Open Files Limit
  • 34. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 각 레이어별 고려사항 • 네트워크 용량 확인 • 부하 생성 클라이언트 • 로드 밸런싱 (Elastic Load Balancing) • 서버 인스턴스 • 어플리케이션 서버 • 어플리케이션 • 데이터베이스 • Thread 기반인 경우 Thread Pool 크기가 적당한지 • Event 기반 비동기 형태의 어플리케이션 서버 사용
  • 35. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 각 레이어별 고려사항 • 네트워크 용량 확인 • 부하 생성 클라이언트 • 로드 밸런싱 (Elastic Load Balancing) • 서버 인스턴스 • 어플리케이션 서버 • 어플리케이션 • 데이터베이스 어플리케이션 코드 – Unit 테스트, Lint • 잘못된 방식의 프레임워크, API 사용 • Blocking 코드 • 불필요한 연산 또는 테스트 코드 어플리케이션 프레임워크 • 웹 프레임워크나 ORM(Object- relational mapping) 라이브러리 오류
  • 36. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 각 레이어별 고려사항 • 네트워크 용량 확인 • 부하 생성 클라이언트 • 로드 밸런싱 (Elastic Load Balancing) • 서버 인스턴스 • 어플리케이션 서버 • 어플리케이션 • 데이터베이스 • CPU 사용률과 응답 시간 확인 • 설정에 따라 더 요구되는 자원이 있는지 점검 • 메모리 사용률 확인
  • 37. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 꼭 알아야할 팁
  • 38. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 부하테스트 시 유용한 팁 모음 • 가능한 모든 것을 자동화 • 로그 기록과 확인 • 적절한 인스턴스의 선택 • 비용 최소화 • 다양한 도구와 서비스의 복합적 활용
  • 39. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 그러면 부하 테스트를 위한 도구들은 어떤것이 있을까요
  • 40. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 부하 테스트 도구들 EC2 설치형 서비스형 AWS 활용형
  • 41. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 부하 테스트 도구들 EC2 설치형 Grinder • Agent 기반 부하 생성 • Thread 기반 구현으로 성능, 동시성에 제한이 있음 Gatling • Akka와 Netty 기반의 Scala로 구현된 부하 테스트 프레임워크 • Async IO 기반으로 높은 성능 제공 • 시나리오 DSL 작성 Tsung • HTTP, Websocket, 인증시스템, 데이터베이스, MQTT 등 TCP 기반의 다양한 프로토콜 Vegeta • HTTP 부하 테스트 • 초당 일정한 속도록 특정 수치의 요청을 지속
  • 42. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 부하 테스트 도구들 EC2 설치형
  • 43. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 부하 테스트 도구들 RedLine13 • AWS Advanced Technology Partner • 부하 테스트 수행 서비스 제공 • AWS IAM 계정을 이용한 Agent 설치 • 스팟 인스턴스 활용을 통한 비용 절감 • JMeter, Gatling, Python, PHP 및 NodeJS 지원 서비스형
  • 44. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 부하 테스트 도구들 RedLine13 서비스형
  • 45. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 부하 테스트 도구들 Loader.io • 클라우드 기반의 부하테스트 서비스 • 대상 서버 지정, 원하는 동시성 지정 등 • 테스트 리플레이 가능 서비스형 출처: loader.io
  • 46. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 부하 테스트 도구들 Bees with Machine Guns • EC2 인스턴스를 지정한 개수만큼 생성해서 부하 테스트 수행 • 스팟 인스턴스 활용 옵션 • ApacheBench 기반 (hurl 사용 가능) AWS 활용형
  • 47. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 부하 테스트 도구들 Goad • AWS Lambda를 이용한 분산 부하 테스트 • 대상 URL에 부하 테스트 수행 후, AWS SQS를 통한 결과 취합 AWS 활용형 Amazon SQS $ goad λ 수행
  • 48. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 부하 테스트 도구 선택은? 도구 명 활용 방법 JMeter 웹 애플리케이션 내에서 사용자의 행동 흐름에 대해 부하 테스트를 하고 싶을 때 Tsung API 가 수용할 수 있는 최대치의 부하를 알고 싶을 때 Vegeta 어떤 API 에 대해 초당 특정 수치의 요청이 지속될 경우 발생하는 상황을 파악하고 싶을 때 Goad 부하 생성 클라이언트 구성을 포함한 부하 테스트 관련 인프라 구성을 피하고 싶을 때 RedLine13 JMeter 로 테스트 플랜을 작성하여 활용을 원하지만, 비용을 최소화 하고 싶고 사용한 만큼만 비용이 발생하길 원할 때 Blazemeter 높은 동시성을 위해 JMeter 의 Remote Testing 기능을 활용하고 싶지만, 테스트 플랜 작성에 집중하고, 부하 테스트 관련 인프라 구성은 하고 싶지 않을 때 Loader.io 부하 테스트 관련 인프라 구성을 하고 싶지 않고, Tsung 과 비슷한 목적으로 사용하고 싶을 때
  • 49. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 데모 1 AWS EC2 자동 구성 Bees with Machine Guns!
  • 50. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Bees with Machine Guns $ bees up $ bees attack $ bees down
  • 51. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Bees with Machine Guns $ bees up EC2 on-demand 또는 Spot 리전 및 가용영역 인스턴스 타입 인스턴스 개수 AMI 서브넷 보안 그룹 SSH 키
  • 52. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Bees with Machine Guns $ bees up -s 2 -g default -z ap-northeast-1a -k aws-nrt-key -i ami-3e42b65f New bees will use the "default" EC2 security group. Please note that port 22 (SSH) is not normally open on this group. You will need to use to the EC2 tools to open it before you will be able to attack. Connecting to the hive. Attempting to call up 2 bees. Waiting for bees to load their machine guns... . Bee i-d73c2348 is ready for the attack Bee i-d43c234b is ready for the attack. The swarm has assembled 2 bees.
  • 53. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Bees with Machine Guns $ bees attack 테스트 대상 URL 총 요청 개수 동시 요청 개수 테스트 수행 시간 최소 RPS (Request Per Second) 요청 VERB (GET, PUT, …) Hurl을 사용하는 경우 추가 설정
  • 54. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Bees with Machine Guns
  • 55. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Bees with Machine Guns $ bees down
  • 56. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 데모 2 AWS Lambda 기반의 부하 테스트툴 Goad 데모
  • 57. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. GO + LOAD  Goad (https://goad.io) “Goad is an AWS Lambda powered, highly distributed, load testing tool built in Go for the 2016 Gopher Gala.”
  • 58. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. GO + LOAD  Goad var execFile = require("child_process").execFile; exports.handler = function(event, context) { child = execFile(event.file, event.args, function(error) { context.done(error, "Process complete!"); }); child.stdout.on("data", console.log); child.stderr.on("data", console.error); };
  • 59. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. GO + LOAD  Goad $ goad –c 30 –m GET –n 10000 –u http://wordpress….northeast.2.elb.amazonaws.com/wordpress/
  • 60. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. GO + LOAD  Goad
  • 61. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 마지막으로 다시 강조하자면 AWS를 이용한 부하 테스트는 …
  • 62. © 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 효율적인 비용 충분하고 유연한 자원 글로벌 리전 활용 쉽고 단순한 아키텍처 구성 및 관리