nGrinder 소개 + 고급 사용법
- 아키텍쳐
- 자이선 / 그루비 스크립트 동작 방식
- DB 테스트
- 로그 레벨 조작 방법
- 리소스 처리 방법
- 라이브러리 처리 방법
- 대규모 응답 처리 방법
- 가중치 부여 방법
- 쓰레드별 다른 처리 방법
- XML / JSON 처리 방법
nGrinder 소개 + 고급 사용법
- 아키텍쳐
- 자이선 / 그루비 스크립트 동작 방식
- DB 테스트
- 로그 레벨 조작 방법
- 리소스 처리 방법
- 라이브러리 처리 방법
- 대규모 응답 처리 방법
- 가중치 부여 방법
- 쓰레드별 다른 처리 방법
- XML / JSON 처리 방법
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: The journey c...OpenWhisk
OpenWhisk is an open-source serverless platform ideally suited to a wide range of scenarios including cognitive, data, IoT, microservices, and mobile workloads. Since we presented OpenWhisk at ServerlessConf London a lot has happened. It has been successfully accepted as an Apache Incubator project and the first production OpenWhisk deployments have happened. From a technical point of view we have added capabilities like a better API Gateway integration and support for web actions, have added integrations with IBM App Connect, IBM Message Hub, and more. During this talk we will discuss our latest additions and illustrate how to benefit by “going” serverless with OpenWhisk by exploring some real-world customer usecases with a focus on how serverless architectures can be exploited in totally different scenarios. Using these usecases we will explain how OpenWhisk works and why it is the ideally platform for these emerging workloads. After the talk we will be looking forward to discussing your own usecases in more detail at our booth.
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: The journey c...OpenWhisk
OpenWhisk is an open-source serverless platform ideally suited to a wide range of scenarios including cognitive, data, IoT, microservices, and mobile workloads. Since we presented OpenWhisk at ServerlessConf London a lot has happened. It has been successfully accepted as an Apache Incubator project and the first production OpenWhisk deployments have happened. From a technical point of view we have added capabilities like a better API Gateway integration and support for web actions, have added integrations with IBM App Connect, IBM Message Hub, and more. During this talk we will discuss our latest additions and illustrate how to benefit by “going” serverless with OpenWhisk by exploring some real-world customer usecases with a focus on how serverless architectures can be exploited in totally different scenarios. Using these usecases we will explain how OpenWhisk works and why it is the ideally platform for these emerging workloads. After the talk we will be looking forward to discussing your own usecases in more detail at our booth.
Oracle SOA Suite Performance Tuning- UKOUG Application Server & Middleware SI...C2B2 Consulting
Matt Brasier, C2B2 Head of Consulting speaking at the UK Oracle User Group App Server & Middleware Special Interest Group Event on Wednesday, the 9th of October 2013.
Introducing SOA and Oracle SOA Suite 11g for Database ProfessionalsLucas Jellema
This session introduces SOA and the new Oracle SOA Suite 11g to the realm of database professionals from which it sometimes seems so far removed. What are the key SOA concepts and objectives? What is at the heart of Oracle SOA Suite 11g: composite applications, BPEL PM, and the mediator. The session shows how SOA services can be leveraged from the database, from triggers, PL/SQL units, or even SQL and how the database can publish events to the event delivery network. It covers how the SOA infrastructure can access the database, primarily using Oracle Database and Oracle Advanced Queueing adapter and how database developers can help in doing so efficiently. It ends with hints for applying SOA concepts to "normal" database development.
어느 해커쏜에 참여한 백엔드 개발자들을 위한 교육자료
쉽게 만든다고 했는데도, 많이 어려웠나봅니다.
제 욕심이 과했던 것 같아요. 담번엔 좀 더 쉽게 !
- 독자 : 백엔드 개발자를 희망하는 사람 (취준생, 이직 희망자), 5년차 이하
- 주요 내용 : 백엔드 개발을 할 때 일어나는 일들(개발팀의 일)
- 비상업적 목적으로 인용은 가능합니다. (출처 명기 필수)
급증하는 온라인 사용자 증가, 부하테스트가 필요하지 않으신가요?
요즘 인터넷 뉴스에는 홈페이지 접속자 폭증으로 인한 서버 다운, xx은행 모바일 앱 접속 에러, 인터넷 뱅킹 장애 등 온라인 시장과 모바일 시장이 급격하게 성장함에 따라 이에 따른 장애 소식이 끊이지 않고 전해지고 있습니다.
그렇다면, 우리는 이런 장애들을 어떻게 대비할 수 있을까요?
웹∙앱 부하테스트 (성능 진단) 및 컨설팅 안은 웹∙앱 부하테스트(성능 진단 테스트) 진행 과정과 이를 기반으로 어떻게 컨설팅을 진행하고 있는지 소개하고, 나아가 관련 장애들을 대비할 수 있는 방법에 대해 설명합니다.
(공유드리는 파일은 slideshare에 업로드되었던 웹∙앱 부하테스트 성능 진단 및 컨설팅 안을 업데이트한 최신 본입니다.)
웹∙앱 부하테스트 (성능 진단) 및 컨설팅 자료는 아래와 같이 구성되어있습니다.
• 웹∙앱 성능을 진단하고 문제에 대한 원인 분석 및 개선방향을 제시합니다.
• 컨설팅 안에는 여러 실 성능 진단을 예시로 들고 이에 대한 원인 분석 및 개선방향을 도
출한 내용이 포함되어 있습니다.
1. 앱 성능 진단
• 앱 진단 절차
• 앱 진단 상세 내용
2. 웹 서버 성능 진단
• 웹 진단 절차
• 웹 진단 방향
3. 부하 테스트
• 현 테스트 시나리오 분석
• 테스트 시나리오 보완 방법
• 부하 테스트 진행 방안
• 부하 테스트 전략
• 클라우드 기반 테스트 방안
모바일 성능 모니터링, 웹 서버 성능 진단 및 부하테스트 컨설팅에 관심이 있으신 분은 아래 연락처로 연락해주시면, 전문 컨설턴트가 안내해드리겠습니다.
hhjung@onycom.com l 02-6395-7722
12. 서버 용량 산정
TPS
(Transaction Per Second / 초당처리량)
• 초당처리량(TPS)= 활성 사용자(Active User) / 평균 응답 시간(Average Response Time)
• 초당처리량(TPS)= 동시 사용자(Concurrent User) / 요청 주기(Request Interval)
• 활성 사용자(Active User) = TPS * 평균 응답 시간(Average Response Time)
• 활성 사용자(Active User) = 동시 사용자(Concurrent User) * 평균 응답 시간(Average Response Time)
/ 요청 주기 (Request Interval)
• 활성 사용자(Active User) = 동시 사용자(Concurrent User) * 평균 응답 시간(Average Response Time) /
[ 평균 응답 시간(Average Response Time) + 평균 Think 타임(Average Think Time) ]
13. 서버 용량 산정
• 활성 사용자 : 96.77
• 3000 * 0.5 / (0.5 + 15)
• 동시 사용자 * 평균 응답 시간 / [ 평균 응답 시간 + 평균 Think 타임 ]
• 필요 TPS : 193.56
• 50 / 0.5
• 초당처리량(TPS)= 활성 사용자 / 평균 응답 시간
동시 사용자 3000명, 목표 응답 시간 0.5초,
Think Time 15초 일 경우
14. 서버 용량 산정
그런데.. 구식…
Cloud 환경에서는 의미가 퇴색
On-Demand / AWS T2 instance / Scaling Group
15. 서버 용량 산정
일단 만들고
성능을 측정해본 다음
투입 서버 사양 / 개수 결정
이후 비용을 줄이기 위해 서버 최적화
16. 로드를 주는 방법?
스크립트 방식/폼 채워넣는 방식
ApacheBench? JMeter?
Gatling? nGrinder?
테스트는 어떻게?
17. 무제한 로드 부여 가능 / 대규모 테스트에 적합
컨트롤러 테스트 대상 서버
로드 생성기
부하제어
스크
립트
분산 테스트
테스트는 어떻게?
31. 스크립팅 – 트랜잭션
Gtest test = new Gtest(1, “통계1”)
MyTest object = new MyTest();
test.record(object, “sendMessageToGoogle”)
class MyTest {
public void sendMessageToGoogle() {
구글에 HTTP를 보내고, 결과 검증
}
….
}
통계 1을 준비하라
여기까지 왔으면 테스트가 성공한거다. 통계1에 트랜잭션을 하나 올려라
34. 테스트 준비시 고려사항
비용
(트래픽/스토리지)
외부 의존성
(블록킹 당할 수 있음)
캐시 효과
(주로 같은 유저 ID에 대한 지속적 호출시)
네트웍 딜레이 포함 여부
(에이전트를 타겟 네트웍과 같은 네트웍에 배치?)
Think Time 포함 여부
(제거시 동시사용자=활성사용자)
35. 테스트 준비시 고려사항
스트레스 테스트
• 주로 장기간 수행
그러나 초기에는 오류때문에
장기간 수행할 수 없을 것
• 개발서버 대상
• 외부 API는 Mock으로 대체
• 캐시 효과 크게 고려하지 않음
• 네트웍 딜레이 제거함
• Think Time 제거함
로드 테스트
• 주로 단기간 수행
• 개발서버+스테이징서버+
실서버 대상
• 외부 API 그대로 유지
• 캐시 효과 제거
• 네트웍 딜레이 제거는 유동적
• Think Time 제거함
51. 성능 테스트에서 주로 발견되는 문제
부적절한 Pool 개수
(작은 커넥션 풀 또는 WAS커넥션풀<DB커넥션풀)
락킹
(synchronized 구문)
Non-Tread Safe 코드에 의한 비정상 동작
(HashMap, ArrayList)
DB 인덱스 설정 오류 / 불필요한 DB 호출
지나친 로깅 또는 부적절 로거 설정
Full GC
(메모리 Leak / 리소스 Leak)
단순 로직 오류
52. 테스트 결과 분석 - Rule of Thumbs
테스트 도구를 의심하지 말것!
문제는 스크립트를 잘못 짰거나
서버가 잘못 동작하는 것임
53. 테스트 모니터링
ngrinder monitor – CPU/메모리/네트웍
[ec2-user ~]$ wget --content-disposition 링크주소
[ec2-user ~]$ tar xvf 모니터파일명.tar
[ec2-user ~]$ cd ngrinder-monitor && run-monitor-bg.sh
55. 테스트 모니터링
pinpont – 대규모 시스템 성능 모니터링
XX XX
https://github.com/naver/pinpoint
56. 사례1 – JVM 메모리 부족
• 부하를 생성하는 타겟으로
커넥션을 맺지 못함
• 서버의 CPU/MEM은 여유가
있는 상황
• 서버측에 CLOSE_WAIT된 소
켓이 존재할 거라 생각했지
만 원인이 아님
• JVM 모니터를 통해 Full GC
발생이 잦고 발생 시점에
TPS가 떨어지는 것을 확인
• JVM 메모리 증가후 증가시
켜 원하는 부하에서 응답을
줄 수 있도록 튜닝
57. 사례2 – ulimit
• 생각보다 성능이 않나오고,
vuser 를 증가시키더라도
추가된 vuser 는
접속 오류 발생
• CPU/메모리/네트웍은
놀고 있는 상황.
• Ulimit을 늘린후 성능 개선