Slide 1

Slide 1 text

Troubleshooting and profiling microservices Michael Hausenblas @mhausenblas
 Developer Advocate, Red Hat
 2018-04-26, Dublin Microservices User Group

Slide 2

Slide 2 text

Hit me up on Twitter: @mhausenblas 2 • Developer Advocate @ Red Hat (Go, Kubernetes, OpenShift) • Developer Advocate @ Mesosphere (Mesos, DC/OS, Kubernetes) • Chief Data Engineer @ MapR (HDFS, HBase, Drill, etc.) • Applied research (4y in Ireland, 7y in Austria) • Nowadays mainly developing tools in Go (Python, Node, Java, C++) • Kinda developer turned ops (aka appops) $ whois mhausenblas

Slide 3

Slide 3 text

Hit me up on Twitter: @mhausenblas 3 admin SRE developer QA architect PM PHB

Slide 4

Slide 4 text

Containerized microservices

Slide 5

Slide 5 text

Hit me up on Twitter: @mhausenblas 5 • containerized setup • observability • troubleshooting • profiling Terminology

Slide 6

Slide 6 text

Hit me up on Twitter: @mhausenblas 6 A note on operational aspects monolith v1 monolith v2 time µS1
 v1 µS2
 v1 µS3
 v1 µS2
 v2 µS3
 v2 µS1
 v2 µS2
 v3 µS3
 v3 µS1
 v3 µS3
 v4 µS2
 v4 µS3
 v5 µS1
 v4 µS2
 v5 µS3
 v6

Slide 7

Slide 7 text

Hit me up on Twitter: @mhausenblas 7 Challenges • Aligning incentives (dev vs. ops) • Fallacies of distributed computing • Where to look when things go sideways

Slide 8

Slide 8 text

Tooling

Slide 9

Slide 9 text

Hit me up on Twitter: @mhausenblas 9 Kubernetes kubernetes.io • Container lifecycle management • Declarative, state-driven • Extensible, modular API • Robust, flexible, scalable Kudos to Lucas Käldström for this figure (source)

Slide 10

Slide 10 text

Hit me up on Twitter: @mhausenblas 10 telepresence.io vapor-ware.github.io/ksync/ www.openshift.org kubed.sh kedgeproject.org ksonnet.io Minikube Minishift Docker Community Edition for Mac & Windows github.com/GoogleCloudPlatform/skaffold draft.sh forge.sh gitkube.sh github.com/weaveworks/flux github.com/MinikubeAddon/watchpod Developing on Kubernetes

Slide 11

Slide 11 text

Hit me up on Twitter: @mhausenblas 11 • Monitoring • Logging • Distributed tracing Observability

Slide 12

Slide 12 text

Hit me up on Twitter: @mhausenblas 12 Monitoring node container app alerts dashboards storage event router

Slide 13

Slide 13 text

Hit me up on Twitter: @mhausenblas 13 Logging

Slide 14

Slide 14 text

Hit me up on Twitter: @mhausenblas 14 Distributed tracing opentracing.io • Roots ~ “time-synced logs” • Standardized • Must-have in a microservices setup • Examples: Zipkin, Jaeger

Slide 15

Slide 15 text

… demo time!

Slide 16

Slide 16 text

Hit me up on Twitter: @mhausenblas 16 Demo 1: debugging a minimal µS-based app • App consists of two microservices: • a stock generator written in Go • a stock consumer written in Node.js • Source code of demo app:
 github.com/kubernauts/dok-example-us stock-gen stock-con

Slide 17

Slide 17 text

Hit me up on Twitter: @mhausenblas 17 stock-gen :9876/stockdata stock-con :9898/average/NYSE:RHT

Slide 18

Slide 18 text

Hit me up on Twitter: @mhausenblas 18 Demo 2: distributed tracing in action

Slide 19

Slide 19 text

Resources

Slide 20

Slide 20 text

Hit me up on Twitter: @mhausenblas 20

Slide 21

Slide 21 text

Hit me up on Twitter: @mhausenblas 21 • medium.com/@copyconstruct/monitoring-and- observability-8417d1952e1c • infoq.com/articles/charity-majors-observability-failure • blog.treasuredata.com/blog/2016/08/03/distributed-logging-architecture- in-the-container-era/ • mhausenblas.info/kubectl-in-action Resources

Slide 22

Slide 22 text

plus.google.com/+RedHat linkedin.com/company/red-hat youtube.com/user/RedHatVideos facebook.com/redhatinc twitter.com/RedHatNews learn.openshift.com