Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Microservices Observability

Microservices Observability

Microservices Observability

More Decks by Claudio Eduardo de Oliveira

Other Decks in Programming

Transcript

  1. About us I am Tiago Angelo Software Engineer at Sensedia

    Working mostly with: - Java - RESTful APIs - Microservices - Container applications in production @kurtisangelo on Twitter /angelokurtis on GitHub 2
  2. whoami! I am Claudio de Oliveira Book Author, Software Architect

    and Developer @sensedia Spring and Docker enthusiast @claudioed on Twitter /claudioed on Github 3
  3. 4

  4. 5 Agenda › Microservices drawbacks › Distributed tracing systems ›

    Spring Cloud Sleuth › Metrics for distributed systems › Kubernetes and Istio
  5. 6 Glossary › Telemetry How to collect data that will

    provide observability (sensors) › Observability Monitoring, Alerting and Visualizations, Distributed Tracing and Log Aggregation.
  6. Fallacies of distributed computing › the network is reliable ›

    latency is zero › bandwidth is infinite 8
  7. Microservices Drawbacks › How microservices connect each other › Network

    Latencies can be a bottleneck › Network can be unreliable › Control the UP and Running instances › It increase the non-functional requirements 9
  8. ...it looks more like this: 11 frontend ... Service1 10.0.0.11

    service1 10.0.0.34 Service1 10.0.0.36 Service1 10.0.0.23 service1 10.0.0.4 service2 10.0.0.40 Service2 10.0.0.25 Service3 10.0.0.1 service3 10.0.0.17 Service3 10.0.0.7
  9. 12

  10. Network Latency Problems › Which microservice was responsible? › How

    to find out where the defect is? › How know what is generally happening during a request? 13
  11. The OpenTracing standard › Cloud Native Computing Foundation (CNCF) ›

    it standardizes the instrumentation of applications for distributed tracing › its says a trace tells the story of a transaction › while a span represents a single call › distributed tracing systems collect and organize all this information in a nice interface and Zipkin is one of them 14
  12. In the Java World 15 › the distributed tracing systems

    needs trace and span unique IDs › Tracers are responsible to add that logic to your application › Spring Cloud Sleuth for Java-based Spring applications
  13. Features › Adds trace and span ids to the SLF4J

    Mapped Diagnostic Context (MDC) › Automatically instruments common ingress and egress points from Spring applications (servlet filter, rest template, feign client) › just add spring-cloud-sleuth-zipkin dependency and the service will generate and send traces to Zipkin via HTTP 17
  14. 20

  15. Key points for kubernetes › Kubernetes was designed to orchestrate

    containers and run container across multiple machines Yaml files for deployments and other stuffs 23 intro
  16. Sidecar Pattern A service which can enrich the main service

    with utility tasks. Normally these tasks are cross-cutting and infrastructure related. 30 sidecar-pattern
  17. › Proxying to remote services › Monitoring › Configuring ›

    Telemetry Main Features 32 sidecar-pattern
  18. A service mesh is a configurable infrastructure layer for a

    microservices application. Service Mesh 33 service-mesh
  19. Goal › Service Mesh was designed to be that would

    handle the service communications 35 service-mesh
  20. This approach can give us some advantages › We can

    take off some responsibilities from our microservices › Ribbon, Hystrix, Metrics and Tracer (OSS) › The platform can provide it for us 36
  21. 37 Istio Advantages › Sidecar Proxy › Service Discovery &

    Load Balancing › Circuit Breaking › Fault Injection › Polyglot (golang, nodejs) it run as a sidecar › Can be used in legacy systems
  22. PILOT Component that programs the Envoy proxies, responsible for service

    discovery, load balancing, and routing. 40 istio
  23. 41 MIXER Component responsible for enforcing access control and usage

    policies across the service mesh and collecting telemetry data from Envoy and other services istio
  24. 43 Prometheus Monitoring and Alerting systems toolkit designed to help

    these tasks for distributed systems. METRICS please, not logging and tracing istio-add-ons
  25. 46

  26. 47

  27. 48

  28. 49