2. About Me
김진웅 @ddiiwoong
Cloud Platform, Data Lake Architect @SK C&C
Interested in Kubernetes and Serverless(FaaS), DevOps, SRE, ML/DL
3. Who am I and Where am I?
Ops
Data Center Virtual Machine Container Serverless
Weeks Minutes Seconds Milliseconds
Dev
1단계 : Self-manage 2단계 : Managed 3단계 : Fully-Managed
OS설치/운영,
개발플랫폼 패치,
백업 등 직접관리
서버 기반이나
관리형 서비스로 제공
(설정, Scale 관리)
서버관리 없는 서비스
(No-Ops)
4. Complexity is inevitable
Microservices Containerization Orchestration Service Mesh
Bare Metal
Kernel
Network Stack
Cloud Stack
Libraries
Frameworks
Your Codes
7. OpenCensus
A single distribution of libraries that
automatically collect traces and metrics
from your app, display them locally, and
send them to any backend.
A Stats Collection and Distributed Tracing Framework
backed by Google and Microsoft in Jan. 2018
8. VM or Kube Pod
VM or Kube Pod
OpenCensus Libraries
Auth.
service
Catalog
service
Search
service
FrontEnd
service
oc
lib
oc
lib
oc
lib
oc
lib
oc agent
oc agent
metrics +
tracing
backends
oc
collector
13. OpenCensus Agent Benefit
● 단일 exporter 관리
● 배포의 민주화 (Democratizes)
○ Backend로 보내는 선택은 개발자의 몫
● 최초 Instrumentation 적용후 언제든지 원하는 Backend로 변경가능
○ Prometheus 에서 Stackdriver로, Zipkin 에서 Jaeger로
● 오버헤드 감소
○ application 재시작 없이 ocagent 만 재시작
● 관측가능한 signal 통합 (pass-through)
○ Routing - Zipkin, Jaeger, Prometheus data
○ polyglot and poly-backend 관리 용이
● 관리 Port 최소화
○ TCP 55678
15. OpenCensus Collector Benefit
● 단일 exporter 관리
● 배포의 민주화 (Democratizes)
○ Backend로 보내는 선택은 개발자의 몫
● 최초 Instrumentation 적용후 언제든지 원하는 Backend로 변경가능
○ Prometheus 에서 Stackdriver로, Zipkin 에서 Jaeger로
● Egress Point 제한
○ Application 내 다수의 API Key, TLS관리 일원화
● Backend까지 data 보장
○ built-in buffering and retry capabilities
● Intelligent (tail-based) Sampling 기능 활용 (percentile, 백분위)
● Annotation
○ span이 수집되는 동안 metadata 추가 가능
● Tagging 가능
○ span에 포함된 tag override, remove 가능
16. Demo - Hipster Shop
Hipster Shop: Cloud-Native Microservices Demo Application
● 상품을 검색 및 구매할 수 있는 웹 기반 이커머스 Application
17. Demo - Hipster Shop
Hipster Shop: Cloud-Native Microservices Demo Application
● 모든 통신은 gRPC, 외부 통신만 HTTP
● Polygot : Go, C#, Node.js, Python, Java
● Istio 구성 가능
● Skaffold 로 배포 (https://skaffold.dev/)
● Backend Embedded
○ Stackdriver - https://github.com/GoogleCloudPlatform/microservices-demo
○ Prometheus - https://github.com/census-ecosystem/opencensus-microservices-demo
● Load Generator(Locust) 가 지속적으로 서비스 호출
● 특정 서비스(CheckoutService/PlaceOrder)에서 Latency 지연 발생
● Backend(Prometheus/Jaeger) 도구로 원인 파악 후 코드 수정 및 재배포