SlideShare a Scribd company logo
1 of 26
Download to read offline
Distributed Tracing Framework
(Apache HTrace)
2016. 05. 20.
민형기
About Me
• 삼성SDS - SSA BigData Analysis 전문가 과정 강의
• 1~3회(2013.02 ~ 2014.02)
• http://www.slideshare.net/hypermin/presentations
• SNDB: 2012~2013.02 (Cassandra)
• (Samsung NoSQL DB – Cassandra, AWS DynamoDB 호환API)
• M-Project: 2014.02~2016.03 (HBase)
• 용도: 메일 저장소, Queue 저장소
• 적용내용
• C++ hbase client
• 2nd index / region colocation
• hbase thrift server customization
• hbase htrace 적용
Contents
• Distribution Tracing
• Why Distribution Tracing
• 주요 Tracing Framework
• Google Dapper
• Twitter Zipkin
• Naver Pinpoint
• Apache HTrace
• 비교
Distribution Tracing?
• 배경
• 분산환경에서 성능을 진단하는 일은 매우 어려움
• 많은 타임아웃과 비정상 상황이 발생
• 성능문제는 100% 재현은 불가
• 다양한 모듈이 여러 노드에 있고 특정 상황에서 발생함
• 분석방법
• LOG
• Metrics
• APM
• Distributed Tracing Tools
Real-World 시나리오
• 클러스터가 가장 최근에 느려졌고, 왜 느려졌지?
• X를 최적화하는데 시간을 들이는 것이 가치가 있을까?
• 왜 클러스터가 주말에 느려졌지?
• 이번 성능문제가, MapReduce 문제인지 HDFS문제인지?
• 왜 EOFException 로그가 많이 발생했지?
Metrics
• 많은 metrics를 사용할 수 있음
• JMX
• top
• vmstat
• iostat
• 장점
• 좋은 Throughput에 대한 View를 제공함
• 안좋은 응답문제를 식별하는데 좋음
• 평균 bandwidth, CPU, disk I/O와 같은 정보를 잘 표현함
• 단점
• Disk I/O stat이 느린 이유가 I/O 때문인지 병목현상 때문인지에 대한 이유를
찾기가 어려움
Log Files
• 모든 Daemon들은 로그파일을 생성함
• audit log
• Log4j files
• Client log files
• 장점
• 가장 손쉽게 정보를 저장할 수 있음
• 특정 요청이나 시점에 상세정보를 얻을 수 있음
• 단점
• 많은 다양한 파일이 생성됨: per-host, per-project, per-facility
• 다수 노드의 로그를 통해 관련된 의미 있는 정보를 얻기가 어려움
• 분석을 위해 로그를 추가하면 과다한 로그가 남게 되고, disk I/O 에 부담
Distributed Tracing Framework을 이용
• Apache HTrace와 같은 Tracing Framework을 이용
• Apache HTrace
• Twitter Zipkin
• Naver Pinpoint
• 장점
• 특정 요청에 대한 클러스터내의 연관정보 확인
• 특정 요청에 대한 End-to-End tracing이 가능함
• 단점
• Metrics과 같은 요약정보를 보여주는 것에는 한계
• 특정시점에 대한 상세정보에는 한계
Distribution Tracing Tools
구분 연도 개발사 특징
Dapper 2010 Google Large-scale Distributed Systems Tracing Infrastructure
• Collects traces from production requests
• Low overhead
• Minimum of extra work for developers
Zipkin 2012 Twitter Distributed Systems Tracing system
• Google Dapper 모델 이용
• Scribe, Finangle, Cassandra 등을 이용하여 구성됨
• Performance bottleneck 발견 등
Naver Pinpoint 2015 Naver Open source APM tool for large-scale distributed systems written in Java.
• Google Dapper 모델 이용
• 분산 트랜잭션 추적, 애플리케이션 토폴로지 자동 발견
• Bytecode instrumentation 기법 사용
Apache HTrace 2014 Cloudera, Apache Tracing framework intended for use with distributed systems written in java.
• Google Dapper 모델 이용
• HDFS/HBase Performance 문제를 해결하기 위해 적용됨
• Apache incubation project
Magpie 2007 Microsoft Online modelling and performance-aware systems
• Capacity planning, Tracking workload level shifts, Detecting component failure,
Performance debugging
X-Trace 2007 UC Berkeley A Pervasive Network Tracing Framework
Pinpoint 2002 UC Berkeley, Stanford Detecting system problems and isolating their root causes.
Google Dapper
• 개요
• Google 20010년 4월 발표됨
• 대용량 분산 시스템 트레이싱 인프라
• 구글 Web 검색은 수많은 sub-system과 다양한 머신으로
구성되고, latency가 아주 중요한 요소임
• Black-box와 annotation-based monitoring schema지원
• 특징
• Collects traces from production requests
• Low overhead
• Minimum of extra work for developers
Twitter Zipkin
• 개요
• 분산시스템을 위한 트레이싱 프레임워크
• 구글 Dapper 논문의 영향
• Twitter에서 개발 (2012)
• 목표
• 퍼포먼스 최적화
Naver Pinpoint
• 개요
• 대규모 분산 시스템 추적 플랫폼
• 구글 Dapper 논문의 영향
• Naver에서 개발 (2015)
• 목표
• 분산된 애플리케이션의 메시지를 추적할 수 있는 분산 트랜잭션 추적
• 애플리케이션 구성을 파악할 수 있는 애플리케이션 토폴로지 자동 발견
• 대규모 서버군을 지원할 수 있는 수평 확장성
• 코드 수준의 가시성을 제공해 문제 발생 지점과 병목 구간을 쉽게 발견
• bytecode instrumentation 기법으로 코드를 수정하지 않고 원하는 기능을 추
가
Apache HTrace
• 개요
• 분산시스템을 위한 트레이싱 프레임워크
• 구글 Dapper 논문의 영향
• Cloudera에서 개발 (2014)
• Apache Incubator project (2015)
• 목표
• Effective for finding bottleneck
• Effective for code analysis
• Low Overhead
참고: http://research.google.com/pubs/pub36356.html
Distributed Tracing Framework 비교
HTrace Zipkin Pinpoint
설명 Distributed Tracing Framework Distributed Tracing Framework Open source APM tool
URL http://htrace.incubator.apache.org/ http://zipkin.io/ https://github.com/naver/pinpoint
회사 Cloudera, Apache Twitter Naver
License Apache 2.0 Apache 2.0 Apache 2.0
버전 4.1(incubating) ? ?
언어 Java/C/Go Java Java
API Reference 문서 약함 보통 약함
특징 • 기본 Stack + 확장(Pluggable):
Zipkin / Flume / Hbase에 연동
• 트레이싱 코드 추가필요
• 분산지원 가능(연계 코드 필요)
• WebApp 기능 약함
• 주목적: 퍼포먼스 최적화
• 전용 Stack: Scribe, Finangle,
Cassandra
• 트레이싱 코드 추가필요
• 분산 지원 우수
• WebApp 기능 보통
• 주목적: 퍼포먼스 최적화
• 전용 Stack: Bytecode
instrumentation
• 트레이싱 코드 추가 필요없음
• 분산 지원 우수
• WebApp 기능 강함 (운영관점)
• 주목적: APM
적용사례 Hadoop/hbase/Hive 등 Twitter / Armeria Naver
3rd party 지원 많음 보통 적음
HTrace - HTrace Goals
• 운영환경에서 시스템 성능을 모니터
• 성능 이슈, Node 장애, 하드웨어 문제를 진단
• 병목구간을 식별하는데 도움
HTrace – Trace Span (1/2)
Htrace에서 Trace Span은 시간거리(length of time)
• Trace Span
• A description
• Start time in milliseconds
• End time in milliseconds
• Unique identifier
• Tracer ID
• Other metadata
{
"s": "092d6961d7e7a5a2",
"b": 1424813328586,
"e": 1424813328595,
"d": "ClientNamenodeProtocol#getListing",
"i": "51fbdaf67e364d18",
"p": [
"9840b24cedd01fcc"
],
"r": "FsShell"
}
HTrace – Trace Span(2/2)
• Spans relationships
• Spans은 부모와 자식을 가지고, 방향성 그래프(DAG)를 형성함
• Ex) HDFS의 ls명령어 (Trace Span Graph)
ls
+--- FileSystem#createFileSystem
+--- Globber#glob
| +---- GetFileInfo
| +---- ClientNamenodeProtocol#GetFileInfo
| +---- ClientProtocol#GetFileInfo
+--- listPaths
+---- ClientNamenodeProtocol#getListing
+---- ClientProtocol#getListing
HTrace – Sampling
• 모든 request를 trace하기는 매우 어려움(극단적으로 많은 trace
데이터가 생성된)
• Sampler를 이용하여 sample데이터에 대해서만 trace 데이터가
저장
• 운영환경에서 사용 가능 (1% 이하만 트레이싱)
• 시스템 부하 측면에서 유용
• Sampling rate와 type은 설정 가능함
• CountSampler – 고정 주기에 따른 샘플
• ProbabilitySampler –일정한 확률로 샘플
HTrace – Tracer
• 서비스와 클라이언트가 트레이스 중임을 나타냄
• 예를들어 FsClient, DataNode, NameNode는 각각 자신의
Tracer 객체를 가지고 있음
• Tracer#Builder를 이용하여 생성됨
• 다양한 Tracer를 생성
• Logger의 name과 같은 의미
• Tracer의 이름으로 trace종류를 구분할 수 있음
• 전형적인 tracer ID: NameNode/192.168.0.1
HTrace – TraceScope
• Tracer#newScope를 이용하여 생성됨
• TraceScope 객체는 Span 객체의 수명을 관리함
• TraceScope가 생성될때, Span 객체에 관계가 생기고,
TraceScope가 닫힐때 span도 같이 닫힘.
• Scope를 닫힐때 SpanReceiver를 통해 span이 처리됨
TraceScope computationScope = tracer.newScope("CalculateFoo");
try {
calculateFoo();
} finally {
computationScope.close();
}
HTrace – SpanReceivers
Trace 정보(Span data)를 받아서 처리
다양한 SpanReceiver를 사용할 수 있음
• LocalFileSpanReceiver: 로컬 파일로 span data를 저장
• HBaseSpanReceiver: hbase에 span data를 저장
• ZipkinSpanReceiver: Twitter Zipkin에 span data를 저장
FoobarApplication
|
V
htrace-core4
|
V
HTracedSpanReceiver OR LocalFileSpanReceiver OR StandardOutSpanReceiver
OR HBaseSpanReceiver OR ZipkinSpanReceiver OR ...
HTrace – API Misc.
• Tracing을 위한 각종 Wrapper를 제공
• TraceRunnable
• TracerCallable
• TraceExecutorService
• TracerPool
• Tracer를 그룹으로 관리할때 사용됨
Runnable myRunnable =
tracer.wrap(myPiRunnable, “calculatePi”);
HTrace – API Internal Classes
Appendix.
Reference.
• 기존
• Magpie: online modelling and performance-aware systems
• Pinpoint: Problem Determination in Large, Dynamic Internet Services
• X-Trace: A Pervasive Network Tracing Framework
• Google Dapper
• Dapper, a Large-Scale Distributed Systems Tracing Infrastructure
• Paper: Dapper, Google’s Large-Scale Distributed Systems Tracing Infrastructure
• Twitter Zipkin
• Distributed Systems Tracing with Zipkin(2012)
• Zipkin: a Distributed Tracing Framework
• Zipkin – Strangeloop
• The Last Pickle: Distributed Tracing from Application to Database
• Introducing CallTracing™, based on RabbitMQ, Spring and Zipkin
Reference.
• Naver Pinpoint
• Naver Pinpoint: open source APM tool for large-scale distributed systems
• 대규모 분산 시스템 추적 플랫폼, Pinpoint
• Apache HTrace
• Introducing Apache HTrace
• Htrace: Tracing in Hbase and HDFS(Hbase Meetup)
• New in Cloudera Labs: Apache HTrace(incubating)
• Introducing Apache HTrace | SCALE 15x

More Related Content

What's hot

[225]빅데이터를 위한 분산 딥러닝 플랫폼 만들기
[225]빅데이터를 위한 분산 딥러닝 플랫폼 만들기[225]빅데이터를 위한 분산 딥러닝 플랫폼 만들기
[225]빅데이터를 위한 분산 딥러닝 플랫폼 만들기NAVER D2
 
Scalable system design patterns
Scalable system design patternsScalable system design patterns
Scalable system design patternsSteve Min
 
Apache spark 소개 및 실습
Apache spark 소개 및 실습Apache spark 소개 및 실습
Apache spark 소개 및 실습동현 강
 
Cloudera & Zookeeper
Cloudera & ZookeeperCloudera & Zookeeper
Cloudera & ZookeeperJunyoung Park
 
AWS의 하둡 관련 서비스 - EMR/S3
AWS의 하둡 관련 서비스 - EMR/S3AWS의 하둡 관련 서비스 - EMR/S3
AWS의 하둡 관련 서비스 - EMR/S3Keeyong Han
 
Spark Day 2017 Machine Learning & Deep Learning With Spark
Spark Day 2017 Machine Learning & Deep Learning With SparkSpark Day 2017 Machine Learning & Deep Learning With Spark
Spark Day 2017 Machine Learning & Deep Learning With SparkSangHoon Lee
 
스파크와 이클립스_연동하기
스파크와 이클립스_연동하기스파크와 이클립스_연동하기
스파크와 이클립스_연동하기Dohyung Park
 
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기AWSKRUG - AWS한국사용자모임
 
Scalable web architecture
Scalable web architectureScalable web architecture
Scalable web architectureSteve Min
 
Big data analysis with R and Apache Tajo (in Korean)
Big data analysis with R and Apache Tajo (in Korean)Big data analysis with R and Apache Tajo (in Korean)
Big data analysis with R and Apache Tajo (in Korean)Gruter
 
Spark overview 이상훈(SK C&C)_스파크 사용자 모임_20141106
Spark overview 이상훈(SK C&C)_스파크 사용자 모임_20141106Spark overview 이상훈(SK C&C)_스파크 사용자 모임_20141106
Spark overview 이상훈(SK C&C)_스파크 사용자 모임_20141106SangHoon Lee
 
[243]kaleido 노현걸
[243]kaleido 노현걸[243]kaleido 노현걸
[243]kaleido 노현걸NAVER D2
 
[124]네이버에서 사용되는 여러가지 Data Platform, 그리고 MongoDB
[124]네이버에서 사용되는 여러가지 Data Platform, 그리고 MongoDB[124]네이버에서 사용되는 여러가지 Data Platform, 그리고 MongoDB
[124]네이버에서 사용되는 여러가지 Data Platform, 그리고 MongoDBNAVER D2
 
AWS EMR Cost optimization
AWS EMR Cost optimizationAWS EMR Cost optimization
AWS EMR Cost optimizationSANG WON PARK
 
Spark와 Hadoop, 완벽한 조합 (한국어)
Spark와 Hadoop, 완벽한 조합 (한국어)Spark와 Hadoop, 완벽한 조합 (한국어)
Spark와 Hadoop, 완벽한 조합 (한국어)Teddy Choi
 
[NDC 2018] Spark, Flintrock, Airflow 로 구현하는 탄력적이고 유연한 데이터 분산처리 자동화 인프라 구축
[NDC 2018] Spark, Flintrock, Airflow 로 구현하는 탄력적이고 유연한 데이터 분산처리 자동화 인프라 구축[NDC 2018] Spark, Flintrock, Airflow 로 구현하는 탄력적이고 유연한 데이터 분산처리 자동화 인프라 구축
[NDC 2018] Spark, Flintrock, Airflow 로 구현하는 탄력적이고 유연한 데이터 분산처리 자동화 인프라 구축Juhong Park
 
Understanding of Apache kafka metrics for monitoring
Understanding of Apache kafka metrics for monitoring Understanding of Apache kafka metrics for monitoring
Understanding of Apache kafka metrics for monitoring SANG WON PARK
 
[225]yarn 기반의 deep learning application cluster 구축 김제민
[225]yarn 기반의 deep learning application cluster 구축 김제민[225]yarn 기반의 deep learning application cluster 구축 김제민
[225]yarn 기반의 deep learning application cluster 구축 김제민NAVER D2
 

What's hot (20)

[225]빅데이터를 위한 분산 딥러닝 플랫폼 만들기
[225]빅데이터를 위한 분산 딥러닝 플랫폼 만들기[225]빅데이터를 위한 분산 딥러닝 플랫폼 만들기
[225]빅데이터를 위한 분산 딥러닝 플랫폼 만들기
 
Scalable system design patterns
Scalable system design patternsScalable system design patterns
Scalable system design patterns
 
Apache spark 소개 및 실습
Apache spark 소개 및 실습Apache spark 소개 및 실습
Apache spark 소개 및 실습
 
Cloudera & Zookeeper
Cloudera & ZookeeperCloudera & Zookeeper
Cloudera & Zookeeper
 
AWS의 하둡 관련 서비스 - EMR/S3
AWS의 하둡 관련 서비스 - EMR/S3AWS의 하둡 관련 서비스 - EMR/S3
AWS의 하둡 관련 서비스 - EMR/S3
 
Apache Kylin
Apache KylinApache Kylin
Apache Kylin
 
Druid+superset
Druid+supersetDruid+superset
Druid+superset
 
Spark Day 2017 Machine Learning & Deep Learning With Spark
Spark Day 2017 Machine Learning & Deep Learning With SparkSpark Day 2017 Machine Learning & Deep Learning With Spark
Spark Day 2017 Machine Learning & Deep Learning With Spark
 
스파크와 이클립스_연동하기
스파크와 이클립스_연동하기스파크와 이클립스_연동하기
스파크와 이클립스_연동하기
 
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기
Spark + S3 + R3를 이용한 데이터 분석 시스템 만들기
 
Scalable web architecture
Scalable web architectureScalable web architecture
Scalable web architecture
 
Big data analysis with R and Apache Tajo (in Korean)
Big data analysis with R and Apache Tajo (in Korean)Big data analysis with R and Apache Tajo (in Korean)
Big data analysis with R and Apache Tajo (in Korean)
 
Spark overview 이상훈(SK C&C)_스파크 사용자 모임_20141106
Spark overview 이상훈(SK C&C)_스파크 사용자 모임_20141106Spark overview 이상훈(SK C&C)_스파크 사용자 모임_20141106
Spark overview 이상훈(SK C&C)_스파크 사용자 모임_20141106
 
[243]kaleido 노현걸
[243]kaleido 노현걸[243]kaleido 노현걸
[243]kaleido 노현걸
 
[124]네이버에서 사용되는 여러가지 Data Platform, 그리고 MongoDB
[124]네이버에서 사용되는 여러가지 Data Platform, 그리고 MongoDB[124]네이버에서 사용되는 여러가지 Data Platform, 그리고 MongoDB
[124]네이버에서 사용되는 여러가지 Data Platform, 그리고 MongoDB
 
AWS EMR Cost optimization
AWS EMR Cost optimizationAWS EMR Cost optimization
AWS EMR Cost optimization
 
Spark와 Hadoop, 완벽한 조합 (한국어)
Spark와 Hadoop, 완벽한 조합 (한국어)Spark와 Hadoop, 완벽한 조합 (한국어)
Spark와 Hadoop, 완벽한 조합 (한국어)
 
[NDC 2018] Spark, Flintrock, Airflow 로 구현하는 탄력적이고 유연한 데이터 분산처리 자동화 인프라 구축
[NDC 2018] Spark, Flintrock, Airflow 로 구현하는 탄력적이고 유연한 데이터 분산처리 자동화 인프라 구축[NDC 2018] Spark, Flintrock, Airflow 로 구현하는 탄력적이고 유연한 데이터 분산처리 자동화 인프라 구축
[NDC 2018] Spark, Flintrock, Airflow 로 구현하는 탄력적이고 유연한 데이터 분산처리 자동화 인프라 구축
 
Understanding of Apache kafka metrics for monitoring
Understanding of Apache kafka metrics for monitoring Understanding of Apache kafka metrics for monitoring
Understanding of Apache kafka metrics for monitoring
 
[225]yarn 기반의 deep learning application cluster 구축 김제민
[225]yarn 기반의 deep learning application cluster 구축 김제민[225]yarn 기반의 deep learning application cluster 구축 김제민
[225]yarn 기반의 deep learning application cluster 구축 김제민
 

Viewers also liked

Scala overview
Scala overviewScala overview
Scala overviewSteve Min
 
Apache Spark Overview part2 (20161117)
Apache Spark Overview part2 (20161117)Apache Spark Overview part2 (20161117)
Apache Spark Overview part2 (20161117)Steve Min
 
[SSA] 04.sql on hadoop(2014.02.05)
[SSA] 04.sql on hadoop(2014.02.05)[SSA] 04.sql on hadoop(2014.02.05)
[SSA] 04.sql on hadoop(2014.02.05)Steve Min
 
Cloud Music v1.0
Cloud Music v1.0Cloud Music v1.0
Cloud Music v1.0Steve Min
 
Hadoop과 SQL-on-Hadoop (A short intro to Hadoop and SQL-on-Hadoop)
Hadoop과 SQL-on-Hadoop (A short intro to Hadoop and SQL-on-Hadoop)Hadoop과 SQL-on-Hadoop (A short intro to Hadoop and SQL-on-Hadoop)
Hadoop과 SQL-on-Hadoop (A short intro to Hadoop and SQL-on-Hadoop)Matthew (정재화)
 
Cloud Computing v1.0
Cloud Computing v1.0Cloud Computing v1.0
Cloud Computing v1.0Steve Min
 
An introduction to hadoop
An introduction to hadoopAn introduction to hadoop
An introduction to hadoopMinJae Kang
 
빅데이터_ISP수업
빅데이터_ISP수업빅데이터_ISP수업
빅데이터_ISP수업jrim Choi
 
NewSQL Database Overview
NewSQL Database OverviewNewSQL Database Overview
NewSQL Database OverviewSteve Min
 
[SSA] 03.newsql database (2014.02.05)
[SSA] 03.newsql database (2014.02.05)[SSA] 03.newsql database (2014.02.05)
[SSA] 03.newsql database (2014.02.05)Steve Min
 
Apache Spark Overview part1 (20161107)
Apache Spark Overview part1 (20161107)Apache Spark Overview part1 (20161107)
Apache Spark Overview part1 (20161107)Steve Min
 
Expanding Your Data Warehouse with Tajo
Expanding Your Data Warehouse with TajoExpanding Your Data Warehouse with Tajo
Expanding Your Data Warehouse with TajoMatthew (정재화)
 
[SSA] 01.bigdata database technology (2014.02.05)
[SSA] 01.bigdata database technology (2014.02.05)[SSA] 01.bigdata database technology (2014.02.05)
[SSA] 01.bigdata database technology (2014.02.05)Steve Min
 
Gruter TECHDAY 2014 MelOn BigData
Gruter TECHDAY 2014 MelOn BigDataGruter TECHDAY 2014 MelOn BigData
Gruter TECHDAY 2014 MelOn BigDataGruter
 

Viewers also liked (18)

Scala overview
Scala overviewScala overview
Scala overview
 
Apache Spark Overview part2 (20161117)
Apache Spark Overview part2 (20161117)Apache Spark Overview part2 (20161117)
Apache Spark Overview part2 (20161117)
 
BigData, Hadoop과 Node.js
BigData, Hadoop과 Node.jsBigData, Hadoop과 Node.js
BigData, Hadoop과 Node.js
 
vertica_tmp_4.5
vertica_tmp_4.5vertica_tmp_4.5
vertica_tmp_4.5
 
[SSA] 04.sql on hadoop(2014.02.05)
[SSA] 04.sql on hadoop(2014.02.05)[SSA] 04.sql on hadoop(2014.02.05)
[SSA] 04.sql on hadoop(2014.02.05)
 
Cloud Music v1.0
Cloud Music v1.0Cloud Music v1.0
Cloud Music v1.0
 
Hadoop과 SQL-on-Hadoop (A short intro to Hadoop and SQL-on-Hadoop)
Hadoop과 SQL-on-Hadoop (A short intro to Hadoop and SQL-on-Hadoop)Hadoop과 SQL-on-Hadoop (A short intro to Hadoop and SQL-on-Hadoop)
Hadoop과 SQL-on-Hadoop (A short intro to Hadoop and SQL-on-Hadoop)
 
Cloud Computing v1.0
Cloud Computing v1.0Cloud Computing v1.0
Cloud Computing v1.0
 
An introduction to hadoop
An introduction to hadoopAn introduction to hadoop
An introduction to hadoop
 
Html5 video
Html5 videoHtml5 video
Html5 video
 
빅데이터_ISP수업
빅데이터_ISP수업빅데이터_ISP수업
빅데이터_ISP수업
 
NewSQL Database Overview
NewSQL Database OverviewNewSQL Database Overview
NewSQL Database Overview
 
[SSA] 03.newsql database (2014.02.05)
[SSA] 03.newsql database (2014.02.05)[SSA] 03.newsql database (2014.02.05)
[SSA] 03.newsql database (2014.02.05)
 
Apache Spark Overview part1 (20161107)
Apache Spark Overview part1 (20161107)Apache Spark Overview part1 (20161107)
Apache Spark Overview part1 (20161107)
 
RESTful API Design, Second Edition
RESTful API Design, Second EditionRESTful API Design, Second Edition
RESTful API Design, Second Edition
 
Expanding Your Data Warehouse with Tajo
Expanding Your Data Warehouse with TajoExpanding Your Data Warehouse with Tajo
Expanding Your Data Warehouse with Tajo
 
[SSA] 01.bigdata database technology (2014.02.05)
[SSA] 01.bigdata database technology (2014.02.05)[SSA] 01.bigdata database technology (2014.02.05)
[SSA] 01.bigdata database technology (2014.02.05)
 
Gruter TECHDAY 2014 MelOn BigData
Gruter TECHDAY 2014 MelOn BigDataGruter TECHDAY 2014 MelOn BigData
Gruter TECHDAY 2014 MelOn BigData
 

Similar to Apache Htrace overview (20160520)

Private PaaS with Docker, spring cloud and mesos
Private PaaS with Docker, spring cloud and mesos Private PaaS with Docker, spring cloud and mesos
Private PaaS with Docker, spring cloud and mesos uEngine Solutions
 
Open standard open cloud engine (3)
Open standard open cloud engine (3)Open standard open cloud engine (3)
Open standard open cloud engine (3)uEngine Solutions
 
Introduction to Apache Tajo
Introduction to Apache TajoIntroduction to Apache Tajo
Introduction to Apache TajoGruter
 
[D2 COMMUNITY] Spark User Group - 스파크를 통한 딥러닝 이론과 실제
[D2 COMMUNITY] Spark User Group - 스파크를 통한 딥러닝 이론과 실제[D2 COMMUNITY] Spark User Group - 스파크를 통한 딥러닝 이론과 실제
[D2 COMMUNITY] Spark User Group - 스파크를 통한 딥러닝 이론과 실제NAVER D2
 
Hadoop Introduction (1.0)
Hadoop Introduction (1.0)Hadoop Introduction (1.0)
Hadoop Introduction (1.0)Keeyong Han
 
빅데이터 기술 현황과 시장 전망(2014)
빅데이터 기술 현황과 시장 전망(2014)빅데이터 기술 현황과 시장 전망(2014)
빅데이터 기술 현황과 시장 전망(2014)Channy Yun
 
5일차.map reduce 활용
5일차.map reduce 활용5일차.map reduce 활용
5일차.map reduce 활용주영 송
 
Spark streaming tutorial
Spark streaming tutorialSpark streaming tutorial
Spark streaming tutorialMinho Kim
 
Node.js를 사용한 Big Data 사례연구
Node.js를 사용한 Big Data 사례연구Node.js를 사용한 Big Data 사례연구
Node.js를 사용한 Big Data 사례연구ByungJoon Lee
 
SQL-on-Hadoop with Apache Tajo, and application case of SK Telecom
SQL-on-Hadoop with Apache Tajo,  and application case of SK TelecomSQL-on-Hadoop with Apache Tajo,  and application case of SK Telecom
SQL-on-Hadoop with Apache Tajo, and application case of SK TelecomGruter
 
비대면 MSA / CNA 강의 - Contactless Microservices Architecture Learning
비대면 MSA / CNA 강의 - Contactless Microservices Architecture Learning비대면 MSA / CNA 강의 - Contactless Microservices Architecture Learning
비대면 MSA / CNA 강의 - Contactless Microservices Architecture LearninguEngine Solutions
 
LUA를 이용한 스마트한 웹서버 만들기 (Ray. Lee)
LUA를 이용한 스마트한 웹서버 만들기 (Ray. Lee)LUA를 이용한 스마트한 웹서버 만들기 (Ray. Lee)
LUA를 이용한 스마트한 웹서버 만들기 (Ray. Lee)삵 (sarc.io)
 
[Td 2015]microsoft 개발자들을 위한 달콤한 hadoop, hd insight(최종욱)
[Td 2015]microsoft 개발자들을 위한 달콤한 hadoop, hd insight(최종욱)[Td 2015]microsoft 개발자들을 위한 달콤한 hadoop, hd insight(최종욱)
[Td 2015]microsoft 개발자들을 위한 달콤한 hadoop, hd insight(최종욱)Sang Don Kim
 
sparklyr을 활용한 R 분산 처리
sparklyr을 활용한 R 분산 처리sparklyr을 활용한 R 분산 처리
sparklyr을 활용한 R 분산 처리Sang-bae Lim
 
Tajo korea meetup oct 2015-spatial tajo
Tajo korea meetup oct 2015-spatial tajoTajo korea meetup oct 2015-spatial tajo
Tajo korea meetup oct 2015-spatial tajoBD
 
빅데이터, big data
빅데이터, big data빅데이터, big data
빅데이터, big dataH K Yoon
 
Cloud life seminar open shift,이준영(배포용)
Cloud life seminar   open shift,이준영(배포용)Cloud life seminar   open shift,이준영(배포용)
Cloud life seminar open shift,이준영(배포용)Software in Life
 
DataWorks Summit 2017
DataWorks Summit 2017DataWorks Summit 2017
DataWorks Summit 2017Daesung Park
 
Python & Spark
Python & SparkPython & Spark
Python & Sparkitproman35
 
지금 핫한 Real-time In-memory Stream Processing 이야기
지금 핫한 Real-time In-memory Stream Processing 이야기지금 핫한 Real-time In-memory Stream Processing 이야기
지금 핫한 Real-time In-memory Stream Processing 이야기Ted Won
 

Similar to Apache Htrace overview (20160520) (20)

Private PaaS with Docker, spring cloud and mesos
Private PaaS with Docker, spring cloud and mesos Private PaaS with Docker, spring cloud and mesos
Private PaaS with Docker, spring cloud and mesos
 
Open standard open cloud engine (3)
Open standard open cloud engine (3)Open standard open cloud engine (3)
Open standard open cloud engine (3)
 
Introduction to Apache Tajo
Introduction to Apache TajoIntroduction to Apache Tajo
Introduction to Apache Tajo
 
[D2 COMMUNITY] Spark User Group - 스파크를 통한 딥러닝 이론과 실제
[D2 COMMUNITY] Spark User Group - 스파크를 통한 딥러닝 이론과 실제[D2 COMMUNITY] Spark User Group - 스파크를 통한 딥러닝 이론과 실제
[D2 COMMUNITY] Spark User Group - 스파크를 통한 딥러닝 이론과 실제
 
Hadoop Introduction (1.0)
Hadoop Introduction (1.0)Hadoop Introduction (1.0)
Hadoop Introduction (1.0)
 
빅데이터 기술 현황과 시장 전망(2014)
빅데이터 기술 현황과 시장 전망(2014)빅데이터 기술 현황과 시장 전망(2014)
빅데이터 기술 현황과 시장 전망(2014)
 
5일차.map reduce 활용
5일차.map reduce 활용5일차.map reduce 활용
5일차.map reduce 활용
 
Spark streaming tutorial
Spark streaming tutorialSpark streaming tutorial
Spark streaming tutorial
 
Node.js를 사용한 Big Data 사례연구
Node.js를 사용한 Big Data 사례연구Node.js를 사용한 Big Data 사례연구
Node.js를 사용한 Big Data 사례연구
 
SQL-on-Hadoop with Apache Tajo, and application case of SK Telecom
SQL-on-Hadoop with Apache Tajo,  and application case of SK TelecomSQL-on-Hadoop with Apache Tajo,  and application case of SK Telecom
SQL-on-Hadoop with Apache Tajo, and application case of SK Telecom
 
비대면 MSA / CNA 강의 - Contactless Microservices Architecture Learning
비대면 MSA / CNA 강의 - Contactless Microservices Architecture Learning비대면 MSA / CNA 강의 - Contactless Microservices Architecture Learning
비대면 MSA / CNA 강의 - Contactless Microservices Architecture Learning
 
LUA를 이용한 스마트한 웹서버 만들기 (Ray. Lee)
LUA를 이용한 스마트한 웹서버 만들기 (Ray. Lee)LUA를 이용한 스마트한 웹서버 만들기 (Ray. Lee)
LUA를 이용한 스마트한 웹서버 만들기 (Ray. Lee)
 
[Td 2015]microsoft 개발자들을 위한 달콤한 hadoop, hd insight(최종욱)
[Td 2015]microsoft 개발자들을 위한 달콤한 hadoop, hd insight(최종욱)[Td 2015]microsoft 개발자들을 위한 달콤한 hadoop, hd insight(최종욱)
[Td 2015]microsoft 개발자들을 위한 달콤한 hadoop, hd insight(최종욱)
 
sparklyr을 활용한 R 분산 처리
sparklyr을 활용한 R 분산 처리sparklyr을 활용한 R 분산 처리
sparklyr을 활용한 R 분산 처리
 
Tajo korea meetup oct 2015-spatial tajo
Tajo korea meetup oct 2015-spatial tajoTajo korea meetup oct 2015-spatial tajo
Tajo korea meetup oct 2015-spatial tajo
 
빅데이터, big data
빅데이터, big data빅데이터, big data
빅데이터, big data
 
Cloud life seminar open shift,이준영(배포용)
Cloud life seminar   open shift,이준영(배포용)Cloud life seminar   open shift,이준영(배포용)
Cloud life seminar open shift,이준영(배포용)
 
DataWorks Summit 2017
DataWorks Summit 2017DataWorks Summit 2017
DataWorks Summit 2017
 
Python & Spark
Python & SparkPython & Spark
Python & Spark
 
지금 핫한 Real-time In-memory Stream Processing 이야기
지금 핫한 Real-time In-memory Stream Processing 이야기지금 핫한 Real-time In-memory Stream Processing 이야기
지금 핫한 Real-time In-memory Stream Processing 이야기
 

Apache Htrace overview (20160520)

  • 1. Distributed Tracing Framework (Apache HTrace) 2016. 05. 20. 민형기
  • 2. About Me • 삼성SDS - SSA BigData Analysis 전문가 과정 강의 • 1~3회(2013.02 ~ 2014.02) • http://www.slideshare.net/hypermin/presentations • SNDB: 2012~2013.02 (Cassandra) • (Samsung NoSQL DB – Cassandra, AWS DynamoDB 호환API) • M-Project: 2014.02~2016.03 (HBase) • 용도: 메일 저장소, Queue 저장소 • 적용내용 • C++ hbase client • 2nd index / region colocation • hbase thrift server customization • hbase htrace 적용
  • 3. Contents • Distribution Tracing • Why Distribution Tracing • 주요 Tracing Framework • Google Dapper • Twitter Zipkin • Naver Pinpoint • Apache HTrace • 비교
  • 4. Distribution Tracing? • 배경 • 분산환경에서 성능을 진단하는 일은 매우 어려움 • 많은 타임아웃과 비정상 상황이 발생 • 성능문제는 100% 재현은 불가 • 다양한 모듈이 여러 노드에 있고 특정 상황에서 발생함 • 분석방법 • LOG • Metrics • APM • Distributed Tracing Tools
  • 5. Real-World 시나리오 • 클러스터가 가장 최근에 느려졌고, 왜 느려졌지? • X를 최적화하는데 시간을 들이는 것이 가치가 있을까? • 왜 클러스터가 주말에 느려졌지? • 이번 성능문제가, MapReduce 문제인지 HDFS문제인지? • 왜 EOFException 로그가 많이 발생했지?
  • 6. Metrics • 많은 metrics를 사용할 수 있음 • JMX • top • vmstat • iostat • 장점 • 좋은 Throughput에 대한 View를 제공함 • 안좋은 응답문제를 식별하는데 좋음 • 평균 bandwidth, CPU, disk I/O와 같은 정보를 잘 표현함 • 단점 • Disk I/O stat이 느린 이유가 I/O 때문인지 병목현상 때문인지에 대한 이유를 찾기가 어려움
  • 7. Log Files • 모든 Daemon들은 로그파일을 생성함 • audit log • Log4j files • Client log files • 장점 • 가장 손쉽게 정보를 저장할 수 있음 • 특정 요청이나 시점에 상세정보를 얻을 수 있음 • 단점 • 많은 다양한 파일이 생성됨: per-host, per-project, per-facility • 다수 노드의 로그를 통해 관련된 의미 있는 정보를 얻기가 어려움 • 분석을 위해 로그를 추가하면 과다한 로그가 남게 되고, disk I/O 에 부담
  • 8. Distributed Tracing Framework을 이용 • Apache HTrace와 같은 Tracing Framework을 이용 • Apache HTrace • Twitter Zipkin • Naver Pinpoint • 장점 • 특정 요청에 대한 클러스터내의 연관정보 확인 • 특정 요청에 대한 End-to-End tracing이 가능함 • 단점 • Metrics과 같은 요약정보를 보여주는 것에는 한계 • 특정시점에 대한 상세정보에는 한계
  • 9. Distribution Tracing Tools 구분 연도 개발사 특징 Dapper 2010 Google Large-scale Distributed Systems Tracing Infrastructure • Collects traces from production requests • Low overhead • Minimum of extra work for developers Zipkin 2012 Twitter Distributed Systems Tracing system • Google Dapper 모델 이용 • Scribe, Finangle, Cassandra 등을 이용하여 구성됨 • Performance bottleneck 발견 등 Naver Pinpoint 2015 Naver Open source APM tool for large-scale distributed systems written in Java. • Google Dapper 모델 이용 • 분산 트랜잭션 추적, 애플리케이션 토폴로지 자동 발견 • Bytecode instrumentation 기법 사용 Apache HTrace 2014 Cloudera, Apache Tracing framework intended for use with distributed systems written in java. • Google Dapper 모델 이용 • HDFS/HBase Performance 문제를 해결하기 위해 적용됨 • Apache incubation project Magpie 2007 Microsoft Online modelling and performance-aware systems • Capacity planning, Tracking workload level shifts, Detecting component failure, Performance debugging X-Trace 2007 UC Berkeley A Pervasive Network Tracing Framework Pinpoint 2002 UC Berkeley, Stanford Detecting system problems and isolating their root causes.
  • 10. Google Dapper • 개요 • Google 20010년 4월 발표됨 • 대용량 분산 시스템 트레이싱 인프라 • 구글 Web 검색은 수많은 sub-system과 다양한 머신으로 구성되고, latency가 아주 중요한 요소임 • Black-box와 annotation-based monitoring schema지원 • 특징 • Collects traces from production requests • Low overhead • Minimum of extra work for developers
  • 11. Twitter Zipkin • 개요 • 분산시스템을 위한 트레이싱 프레임워크 • 구글 Dapper 논문의 영향 • Twitter에서 개발 (2012) • 목표 • 퍼포먼스 최적화
  • 12. Naver Pinpoint • 개요 • 대규모 분산 시스템 추적 플랫폼 • 구글 Dapper 논문의 영향 • Naver에서 개발 (2015) • 목표 • 분산된 애플리케이션의 메시지를 추적할 수 있는 분산 트랜잭션 추적 • 애플리케이션 구성을 파악할 수 있는 애플리케이션 토폴로지 자동 발견 • 대규모 서버군을 지원할 수 있는 수평 확장성 • 코드 수준의 가시성을 제공해 문제 발생 지점과 병목 구간을 쉽게 발견 • bytecode instrumentation 기법으로 코드를 수정하지 않고 원하는 기능을 추 가
  • 13. Apache HTrace • 개요 • 분산시스템을 위한 트레이싱 프레임워크 • 구글 Dapper 논문의 영향 • Cloudera에서 개발 (2014) • Apache Incubator project (2015) • 목표 • Effective for finding bottleneck • Effective for code analysis • Low Overhead 참고: http://research.google.com/pubs/pub36356.html
  • 14. Distributed Tracing Framework 비교 HTrace Zipkin Pinpoint 설명 Distributed Tracing Framework Distributed Tracing Framework Open source APM tool URL http://htrace.incubator.apache.org/ http://zipkin.io/ https://github.com/naver/pinpoint 회사 Cloudera, Apache Twitter Naver License Apache 2.0 Apache 2.0 Apache 2.0 버전 4.1(incubating) ? ? 언어 Java/C/Go Java Java API Reference 문서 약함 보통 약함 특징 • 기본 Stack + 확장(Pluggable): Zipkin / Flume / Hbase에 연동 • 트레이싱 코드 추가필요 • 분산지원 가능(연계 코드 필요) • WebApp 기능 약함 • 주목적: 퍼포먼스 최적화 • 전용 Stack: Scribe, Finangle, Cassandra • 트레이싱 코드 추가필요 • 분산 지원 우수 • WebApp 기능 보통 • 주목적: 퍼포먼스 최적화 • 전용 Stack: Bytecode instrumentation • 트레이싱 코드 추가 필요없음 • 분산 지원 우수 • WebApp 기능 강함 (운영관점) • 주목적: APM 적용사례 Hadoop/hbase/Hive 등 Twitter / Armeria Naver 3rd party 지원 많음 보통 적음
  • 15. HTrace - HTrace Goals • 운영환경에서 시스템 성능을 모니터 • 성능 이슈, Node 장애, 하드웨어 문제를 진단 • 병목구간을 식별하는데 도움
  • 16. HTrace – Trace Span (1/2) Htrace에서 Trace Span은 시간거리(length of time) • Trace Span • A description • Start time in milliseconds • End time in milliseconds • Unique identifier • Tracer ID • Other metadata { "s": "092d6961d7e7a5a2", "b": 1424813328586, "e": 1424813328595, "d": "ClientNamenodeProtocol#getListing", "i": "51fbdaf67e364d18", "p": [ "9840b24cedd01fcc" ], "r": "FsShell" }
  • 17. HTrace – Trace Span(2/2) • Spans relationships • Spans은 부모와 자식을 가지고, 방향성 그래프(DAG)를 형성함 • Ex) HDFS의 ls명령어 (Trace Span Graph) ls +--- FileSystem#createFileSystem +--- Globber#glob | +---- GetFileInfo | +---- ClientNamenodeProtocol#GetFileInfo | +---- ClientProtocol#GetFileInfo +--- listPaths +---- ClientNamenodeProtocol#getListing +---- ClientProtocol#getListing
  • 18. HTrace – Sampling • 모든 request를 trace하기는 매우 어려움(극단적으로 많은 trace 데이터가 생성된) • Sampler를 이용하여 sample데이터에 대해서만 trace 데이터가 저장 • 운영환경에서 사용 가능 (1% 이하만 트레이싱) • 시스템 부하 측면에서 유용 • Sampling rate와 type은 설정 가능함 • CountSampler – 고정 주기에 따른 샘플 • ProbabilitySampler –일정한 확률로 샘플
  • 19. HTrace – Tracer • 서비스와 클라이언트가 트레이스 중임을 나타냄 • 예를들어 FsClient, DataNode, NameNode는 각각 자신의 Tracer 객체를 가지고 있음 • Tracer#Builder를 이용하여 생성됨 • 다양한 Tracer를 생성 • Logger의 name과 같은 의미 • Tracer의 이름으로 trace종류를 구분할 수 있음 • 전형적인 tracer ID: NameNode/192.168.0.1
  • 20. HTrace – TraceScope • Tracer#newScope를 이용하여 생성됨 • TraceScope 객체는 Span 객체의 수명을 관리함 • TraceScope가 생성될때, Span 객체에 관계가 생기고, TraceScope가 닫힐때 span도 같이 닫힘. • Scope를 닫힐때 SpanReceiver를 통해 span이 처리됨 TraceScope computationScope = tracer.newScope("CalculateFoo"); try { calculateFoo(); } finally { computationScope.close(); }
  • 21. HTrace – SpanReceivers Trace 정보(Span data)를 받아서 처리 다양한 SpanReceiver를 사용할 수 있음 • LocalFileSpanReceiver: 로컬 파일로 span data를 저장 • HBaseSpanReceiver: hbase에 span data를 저장 • ZipkinSpanReceiver: Twitter Zipkin에 span data를 저장 FoobarApplication | V htrace-core4 | V HTracedSpanReceiver OR LocalFileSpanReceiver OR StandardOutSpanReceiver OR HBaseSpanReceiver OR ZipkinSpanReceiver OR ...
  • 22. HTrace – API Misc. • Tracing을 위한 각종 Wrapper를 제공 • TraceRunnable • TracerCallable • TraceExecutorService • TracerPool • Tracer를 그룹으로 관리할때 사용됨 Runnable myRunnable = tracer.wrap(myPiRunnable, “calculatePi”);
  • 23. HTrace – API Internal Classes
  • 25. Reference. • 기존 • Magpie: online modelling and performance-aware systems • Pinpoint: Problem Determination in Large, Dynamic Internet Services • X-Trace: A Pervasive Network Tracing Framework • Google Dapper • Dapper, a Large-Scale Distributed Systems Tracing Infrastructure • Paper: Dapper, Google’s Large-Scale Distributed Systems Tracing Infrastructure • Twitter Zipkin • Distributed Systems Tracing with Zipkin(2012) • Zipkin: a Distributed Tracing Framework • Zipkin – Strangeloop • The Last Pickle: Distributed Tracing from Application to Database • Introducing CallTracing™, based on RabbitMQ, Spring and Zipkin
  • 26. Reference. • Naver Pinpoint • Naver Pinpoint: open source APM tool for large-scale distributed systems • 대규모 분산 시스템 추적 플랫폼, Pinpoint • Apache HTrace • Introducing Apache HTrace • Htrace: Tracing in Hbase and HDFS(Hbase Meetup) • New in Cloudera Labs: Apache HTrace(incubating) • Introducing Apache HTrace | SCALE 15x