© 2022, Amazon Web Services, Inc. or its affiliates.
© 2022, Amazon Web Services, Inc. or its affiliates.
Observability Practices on AWS
최 철 우
Solutions Architect
AWS
© 2022, Amazon Web Services, Inc. or its affiliates.
Agenda
Observability 에 대한 이해
Monitoring Essentials
Observability on AWS
정리하기
2
© 2022, Amazon Web Services, Inc. or its affiliates.
What is observability
Observability is a measure of how well internal states of
a system can be inferred from knowledge of its external outputs
Monitoring 은 시스템 잘 동작하고 있는지 말해줍니다. ;
observability 는 시스템이 동작하지 않는 이유를 이해할 수 있게 해줍니다.
좋은 observability 는 무엇을 질문해야 할지 모르는 상황에서
답을 찾을 수 있게 돕습니다.
© 2022, Amazon Web Services, Inc. or its affiliates.
이슈 타임라인
Detect Identify Fix Verify
MTTD
MTTI
MTTR
© 2022, Amazon Web Services, Inc. or its affiliates.
문제 해결을 위한 작업흐름
Alert
Ticket
Analyze Metrics
Analyze Traces
Analyze Logs
Correlation attempt
Detect Identify Fix Verify
Error
occurs
© 2022, Amazon Web Services, Inc. or its affiliates.
Observability 성숙 레벨
Logs, metrics,
and traces
Correlation
and insights
Automatic root
cause identification
Analytic abilities
© 2022, Amazon Web Services, Inc. or its affiliates.
© 2022, Amazon Web Services, Inc. or its affiliates.
Monitoring Essentials
7
© 2022, Amazon Web Services, Inc. or its affiliates.
시스템, 서비스 매트릭 모니터링
시스템, 서비스의 각종 매트릭에 대해 이해하고 있을까
8
• 모니터링을 위해 필요한 지표를 수집 및 시각화
• 각 AWS 서비스들은 각각의 모니터링 매트릭 제공
• 매트릭에 대한 이해 필요
Amazon CloudWatch
© 2022, Amazon Web Services, Inc. or its affiliates.
백분위 값에 대한 매트릭
서비스 Latency, CPU 사용률 값의 이해
9
• p99, p95, p90 등의 백분위 지표 사용
© 2022, Amazon Web Services, Inc. or its affiliates.
매트릭에 대한 알람 구성
어떤 지표들이 중요할까?
• 시스템/서비스 별 중요 지표들
• 서비스 응답시간: avg, p90, p95, p99
알람 구성
• 알람의 기준치 설정
• 중요한 알람 놓치지 않기 – 알람에 대한 피로도 관리
• false positive 관리
• 중요도에 따른 알람 채널 구성
• 여러 방식으로 알림 전달
10
중요한 지표들에 대해 알람이 구성되어 있나?
© 2022, Amazon Web Services, Inc. or its affiliates.
CloudWatch Alarm
매트릭의 임계치를 설정하고
그에 따른 Action 지정
11
Alarm
CloudWatch
Anomaly Detection
• 머신러닝을 통해 기대 범위를
벗어난 상황에 대해 알림
© 2022, Amazon Web Services, Inc. or its affiliates.
Composite Alarms
여러 알람을 결합하여, 알람 노이즈를 줄이고 보다 중요한 운영 이슈에 집중
12
© 2022, Amazon Web Services, Inc. or its affiliates.
모니터링 대시보드
서비스의 상황을 종합적으로 살펴보고 이해할 수 있는 공간이 있을까?
13
CloudWatch Dashboard
• 주요한 서비스 상황을
종합적으로 볼 수 있는 대시보드
• 원하는 매트릭으로 대시보드
구성
• Automatic Dashboard
© 2022, Amazon Web Services, Inc. or its affiliates.
Logs
Inspection, Tracing을 위해 필요한 로그를 수집하고 있나
14
CloudWatch Logs
CloudWatch
Log Agent
/var/log/myapp/application.log – debug을 위해 필요한 정보들
/var/log/myapp/error.log – exception 발생 시 trace 로그
• AWS 서비스에서 발생하는 로그
• 시스템의 상세 정보 수집
• Application 에서 발생하는 로그 수집
로그 관리 + 로그 분석
→ 로그 기반으로 Custom 매트릭 생성
© 2022, Amazon Web Services, Inc. or its affiliates.
분산 애플리케이션 모니터링
• 복잡해지는 시스템 구성
• 어디서 문제가 발생하고 어디까지 어떻게 영향을 줄까
15
AWS X-Ray
분산 애플리케이션의 분석 및 디버깅
© 2022, Amazon Web Services, Inc. or its affiliates.
© 2022, Amazon Web Services, Inc. or its affiliates.
Observability on AWS
16
© 2022, Amazon Web Services, Inc. or its affiliates.
AWS observability 스택
Amazon CloudWatch logs
AWS X-Ray traces
Amazon CloudWatch metrics
AWS observability tools
What: 시간 간격에 따라 측정된
데이터를 숫자 형태로 표현
Why: 트렌드를 식별하고,
수학적으로 모델링된 지표를
표현하는 데에 유용함
What: 시간 경과에 따라 발생한 이벤트
로그를 저장
Why: 긴급하고 예측할 수 없는 행동을
발견하는 데 유용함
What: 종단간 요청 흐름에 대한
일련의 분산 이벤트를 표현
Why: 요청의 전체적인 흐름에 대한
가시성을 제공
© 2022, Amazon Web Services, Inc. or its affiliates.
AWS observability 도구
Container
Insights
Metrics
explorer
Synthetics
ServiceLens
X-Ray
Insights
Lambda
Insights
Contributor
Insights
Anomaly detection 을 통해 이슈를
자동으로 인지하고, 알림 전달
Lambda의 성능 및 여러
상태 매트릭을 통해 보다
깊은 수준의 인사이트 제공
CloudWatch Logs에서
가장 영향을 주는 시계열
데이터 제공
완전한 관리형 모니터링
플랫폼
웹사이트 및 엔드포인트에
대한 실 사용자 모니터링
수행
서비스 병목 현상을
신속하게 식별하기 위해
쉽게 로그, 메트릭 및
Trace 의 상관 관계 분석
리소스 태그를 사용해서
동적인 대시보드 제공
© 2022, Amazon Web Services, Inc. or its affiliates.
CloudWatch Logs Insights
대화식으로 로그 데이터를 검색하고 분석
19
• 유연한 쿼리 언어
• 필터링, 집계, 백분위,
정규표현식 등 사용
• 쿼리 자동 완성
• 샘플 쿼리
© 2022, Amazon Web Services, Inc. or its affiliates.
CloudWatch ServiceLens
한 곳에서 애플리케이션의 상태, 성능 및 가용성을 시각화하고 분석 수행
• CloudWatch를 X-Ray와
통합해서 End-to-End 보기 제공
• Traffic, Latency, Error 관점의
서비스 맵
• 특정 노드와 상관된 매트릭,
로그 및 추적에 대한 인사이트
© 2022, Amazon Web Services, Inc. or its affiliates.
CloudWatch ServiceLens - Tracing
21
© 2022, Amazon Web Services, Inc. or its affiliates.
CloudWatch Synthetics
24시간 스테줄에 따라 엔드포인트에서 테스트를 실행하고 애플리케이션
엔드포인트가 예상대로 작동하지 않을 때 알림 전달
실제 사용자 경험을 체크
• 스크립트 구성 가능
• 스케줄에 따라 실행
• 가용성 및 latency 확인
• 로딩 시간 데이터 저장
• 스크린샷 저장
© 2022, Amazon Web Services, Inc. or its affiliates.
AWS observability
AWS-native monitoring service Open source managed services
Do it yourself (DIY)
Instrumentation
X-Ray agent
Service (Amazon ES) –
logs
(AMP)
Jaeger
© 2022, Amazon Web Services, Inc. or its affiliates.
© 2022, Amazon Web Services, Inc. or its affiliates.
정리하기
24
© 2022, Amazon Web Services, Inc. or its affiliates.
AWS 에서의 생산성
ServiceLens
analysis
Analyze traces
Analyze logs
Correlation
Detect Identify Fix Verify
Insight
notification
Alert from
synthetics
Alert
Ticket
Analyze metrics
Analyze traces
Analyze logs
Correlation attempt
Detect Identify Fix Verify
Error
occurs
Analyze metrics
© 2022, Amazon Web Services, Inc. or its affiliates.
정리
Monitoring
• 매트릭 수집 및 이해
• 주요 매트릭에 대한 알람 구성 – 심각도에 따른 구분
• 전체를 종합적으로 이해하기 위한 대시보드
• 로그 수집 및 저장을 통한 분석 그리고 매트릭 구성
• 분산 애플리케이션의 모니터링
Observability
• AWS 의 다양한 Observability 도구들 - Insights 시리즈
• 전체 서비스 상태 점검으로 시작해서, 세부 분석 후, 상세 Tracing
• 로그의 검색 및 분석, 웹 사이트 모니터링
26
© 2022, Amazon Web Services, Inc. or its affiliates.
Thank you!
© 2022, Amazon Web Services, Inc. or its affiliates.
최 철 우
@prorhap

[WhaTap DevOps Day] 세션 1 : Observability Practice on AWS

  • 1.
    © 2022, AmazonWeb Services, Inc. or its affiliates. © 2022, Amazon Web Services, Inc. or its affiliates. Observability Practices on AWS 최 철 우 Solutions Architect AWS
  • 2.
    © 2022, AmazonWeb Services, Inc. or its affiliates. Agenda Observability 에 대한 이해 Monitoring Essentials Observability on AWS 정리하기 2
  • 3.
    © 2022, AmazonWeb Services, Inc. or its affiliates. What is observability Observability is a measure of how well internal states of a system can be inferred from knowledge of its external outputs Monitoring 은 시스템 잘 동작하고 있는지 말해줍니다. ; observability 는 시스템이 동작하지 않는 이유를 이해할 수 있게 해줍니다. 좋은 observability 는 무엇을 질문해야 할지 모르는 상황에서 답을 찾을 수 있게 돕습니다.
  • 4.
    © 2022, AmazonWeb Services, Inc. or its affiliates. 이슈 타임라인 Detect Identify Fix Verify MTTD MTTI MTTR
  • 5.
    © 2022, AmazonWeb Services, Inc. or its affiliates. 문제 해결을 위한 작업흐름 Alert Ticket Analyze Metrics Analyze Traces Analyze Logs Correlation attempt Detect Identify Fix Verify Error occurs
  • 6.
    © 2022, AmazonWeb Services, Inc. or its affiliates. Observability 성숙 레벨 Logs, metrics, and traces Correlation and insights Automatic root cause identification Analytic abilities
  • 7.
    © 2022, AmazonWeb Services, Inc. or its affiliates. © 2022, Amazon Web Services, Inc. or its affiliates. Monitoring Essentials 7
  • 8.
    © 2022, AmazonWeb Services, Inc. or its affiliates. 시스템, 서비스 매트릭 모니터링 시스템, 서비스의 각종 매트릭에 대해 이해하고 있을까 8 • 모니터링을 위해 필요한 지표를 수집 및 시각화 • 각 AWS 서비스들은 각각의 모니터링 매트릭 제공 • 매트릭에 대한 이해 필요 Amazon CloudWatch
  • 9.
    © 2022, AmazonWeb Services, Inc. or its affiliates. 백분위 값에 대한 매트릭 서비스 Latency, CPU 사용률 값의 이해 9 • p99, p95, p90 등의 백분위 지표 사용
  • 10.
    © 2022, AmazonWeb Services, Inc. or its affiliates. 매트릭에 대한 알람 구성 어떤 지표들이 중요할까? • 시스템/서비스 별 중요 지표들 • 서비스 응답시간: avg, p90, p95, p99 알람 구성 • 알람의 기준치 설정 • 중요한 알람 놓치지 않기 – 알람에 대한 피로도 관리 • false positive 관리 • 중요도에 따른 알람 채널 구성 • 여러 방식으로 알림 전달 10 중요한 지표들에 대해 알람이 구성되어 있나?
  • 11.
    © 2022, AmazonWeb Services, Inc. or its affiliates. CloudWatch Alarm 매트릭의 임계치를 설정하고 그에 따른 Action 지정 11 Alarm CloudWatch Anomaly Detection • 머신러닝을 통해 기대 범위를 벗어난 상황에 대해 알림
  • 12.
    © 2022, AmazonWeb Services, Inc. or its affiliates. Composite Alarms 여러 알람을 결합하여, 알람 노이즈를 줄이고 보다 중요한 운영 이슈에 집중 12
  • 13.
    © 2022, AmazonWeb Services, Inc. or its affiliates. 모니터링 대시보드 서비스의 상황을 종합적으로 살펴보고 이해할 수 있는 공간이 있을까? 13 CloudWatch Dashboard • 주요한 서비스 상황을 종합적으로 볼 수 있는 대시보드 • 원하는 매트릭으로 대시보드 구성 • Automatic Dashboard
  • 14.
    © 2022, AmazonWeb Services, Inc. or its affiliates. Logs Inspection, Tracing을 위해 필요한 로그를 수집하고 있나 14 CloudWatch Logs CloudWatch Log Agent /var/log/myapp/application.log – debug을 위해 필요한 정보들 /var/log/myapp/error.log – exception 발생 시 trace 로그 • AWS 서비스에서 발생하는 로그 • 시스템의 상세 정보 수집 • Application 에서 발생하는 로그 수집 로그 관리 + 로그 분석 → 로그 기반으로 Custom 매트릭 생성
  • 15.
    © 2022, AmazonWeb Services, Inc. or its affiliates. 분산 애플리케이션 모니터링 • 복잡해지는 시스템 구성 • 어디서 문제가 발생하고 어디까지 어떻게 영향을 줄까 15 AWS X-Ray 분산 애플리케이션의 분석 및 디버깅
  • 16.
    © 2022, AmazonWeb Services, Inc. or its affiliates. © 2022, Amazon Web Services, Inc. or its affiliates. Observability on AWS 16
  • 17.
    © 2022, AmazonWeb Services, Inc. or its affiliates. AWS observability 스택 Amazon CloudWatch logs AWS X-Ray traces Amazon CloudWatch metrics AWS observability tools What: 시간 간격에 따라 측정된 데이터를 숫자 형태로 표현 Why: 트렌드를 식별하고, 수학적으로 모델링된 지표를 표현하는 데에 유용함 What: 시간 경과에 따라 발생한 이벤트 로그를 저장 Why: 긴급하고 예측할 수 없는 행동을 발견하는 데 유용함 What: 종단간 요청 흐름에 대한 일련의 분산 이벤트를 표현 Why: 요청의 전체적인 흐름에 대한 가시성을 제공
  • 18.
    © 2022, AmazonWeb Services, Inc. or its affiliates. AWS observability 도구 Container Insights Metrics explorer Synthetics ServiceLens X-Ray Insights Lambda Insights Contributor Insights Anomaly detection 을 통해 이슈를 자동으로 인지하고, 알림 전달 Lambda의 성능 및 여러 상태 매트릭을 통해 보다 깊은 수준의 인사이트 제공 CloudWatch Logs에서 가장 영향을 주는 시계열 데이터 제공 완전한 관리형 모니터링 플랫폼 웹사이트 및 엔드포인트에 대한 실 사용자 모니터링 수행 서비스 병목 현상을 신속하게 식별하기 위해 쉽게 로그, 메트릭 및 Trace 의 상관 관계 분석 리소스 태그를 사용해서 동적인 대시보드 제공
  • 19.
    © 2022, AmazonWeb Services, Inc. or its affiliates. CloudWatch Logs Insights 대화식으로 로그 데이터를 검색하고 분석 19 • 유연한 쿼리 언어 • 필터링, 집계, 백분위, 정규표현식 등 사용 • 쿼리 자동 완성 • 샘플 쿼리
  • 20.
    © 2022, AmazonWeb Services, Inc. or its affiliates. CloudWatch ServiceLens 한 곳에서 애플리케이션의 상태, 성능 및 가용성을 시각화하고 분석 수행 • CloudWatch를 X-Ray와 통합해서 End-to-End 보기 제공 • Traffic, Latency, Error 관점의 서비스 맵 • 특정 노드와 상관된 매트릭, 로그 및 추적에 대한 인사이트
  • 21.
    © 2022, AmazonWeb Services, Inc. or its affiliates. CloudWatch ServiceLens - Tracing 21
  • 22.
    © 2022, AmazonWeb Services, Inc. or its affiliates. CloudWatch Synthetics 24시간 스테줄에 따라 엔드포인트에서 테스트를 실행하고 애플리케이션 엔드포인트가 예상대로 작동하지 않을 때 알림 전달 실제 사용자 경험을 체크 • 스크립트 구성 가능 • 스케줄에 따라 실행 • 가용성 및 latency 확인 • 로딩 시간 데이터 저장 • 스크린샷 저장
  • 23.
    © 2022, AmazonWeb Services, Inc. or its affiliates. AWS observability AWS-native monitoring service Open source managed services Do it yourself (DIY) Instrumentation X-Ray agent Service (Amazon ES) – logs (AMP) Jaeger
  • 24.
    © 2022, AmazonWeb Services, Inc. or its affiliates. © 2022, Amazon Web Services, Inc. or its affiliates. 정리하기 24
  • 25.
    © 2022, AmazonWeb Services, Inc. or its affiliates. AWS 에서의 생산성 ServiceLens analysis Analyze traces Analyze logs Correlation Detect Identify Fix Verify Insight notification Alert from synthetics Alert Ticket Analyze metrics Analyze traces Analyze logs Correlation attempt Detect Identify Fix Verify Error occurs Analyze metrics
  • 26.
    © 2022, AmazonWeb Services, Inc. or its affiliates. 정리 Monitoring • 매트릭 수집 및 이해 • 주요 매트릭에 대한 알람 구성 – 심각도에 따른 구분 • 전체를 종합적으로 이해하기 위한 대시보드 • 로그 수집 및 저장을 통한 분석 그리고 매트릭 구성 • 분산 애플리케이션의 모니터링 Observability • AWS 의 다양한 Observability 도구들 - Insights 시리즈 • 전체 서비스 상태 점검으로 시작해서, 세부 분석 후, 상세 Tracing • 로그의 검색 및 분석, 웹 사이트 모니터링 26
  • 27.
    © 2022, AmazonWeb Services, Inc. or its affiliates. Thank you! © 2022, Amazon Web Services, Inc. or its affiliates. 최 철 우 @prorhap