Slide 1

Slide 1 text

Microservices Observability Cláudio E. de Oliveira Arquiteto & Software Engineer [email protected]

Slide 2

Slide 2 text

AGENDA Microservices Drawbacks Kubernetes Open Tracing Spring Cloud Sleuth Service Mesh ISTIO 1 2 3 4 5 6

Slide 3

Slide 3 text

Where we come from Campinas-SP São Paulo-SP Rio de Janeiro-RJ Sensedia no mundo 2007 2009 2012 Fundada como Especialista SOA CI&T spinoff GARTNER SOA Governance Magic Quadrant Lançamento Sensedia API Platform 2015 Primeira Edição APIX 2016 FORRESTER - Strong Performers | Forrester Wave API Mgmt Q4 2016 GARTNER - Visionaries | Oct, 2016 Magic Quadrant Full Lifecycle API Management

Slide 4

Slide 4 text

whoami! I am Claudio de Oliveira Book Author, Software Architect and Developer work @sensedia APIs, Spring and Docker enthusiast @claudioed on Twitter /claudioed on Github http://claudioed.tech

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Glossary › Telemetry How to collect data that will provide observability (sensors) › Observability Monitoring, Alerting and Visualizations, Distributed Tracing and Log Aggregation.

Slide 7

Slide 7 text

MICROSERVICES DRAWBACKS

Slide 8

Slide 8 text

Fallacies of distributed computing › the network is reliable › latency is zero › bandwidth is infinite

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

your system doesn't look like this: service1 service2 service4 service3 DB

Slide 11

Slide 11 text

...it looks more like this: 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

Slide 12

Slide 12 text

Network Latency Problems › Which microservice was responsible? › How to find out where the defect is? › How know what is generally happening during a request?

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

Introducing Kubernetes Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications.

Slide 15

Slide 15 text

Kubernetes Architecture Diagram

Slide 16

Slide 16 text

“ Kubernetes was designed to orchestrate containers and run container across multiple machines.

Slide 17

Slide 17 text

Now we are ready to talk about Observability...

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

We need to emit some events or data to someone collect...

Slide 20

Slide 20 text

SPRING CLOUD SLEUTH Services interactions instrumented automatically

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

Ways to emit data Popularized by Netflix OSS and Spring Cloud Spring Framework enable it in Spring Boot All these features works only in JVM languages

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

Let’s think a little bit differently...

Slide 25

Slide 25 text

What about the platform infrastructure for service communications ???

Slide 26

Slide 26 text

ISTIO

Slide 27

Slide 27 text

But before, we need to learn some new concepts...

Slide 28

Slide 28 text

Sidecar Pattern

Slide 29

Slide 29 text

Sidecar Pattern A service which can enrich the main service with utility tasks. Normally these tasks are cross-cutting and infrastructure related.

Slide 30

Slide 30 text

Sidecar Pattern

Slide 31

Slide 31 text

A service mesh is a configurable infrastructure layer for a microservices application. Service Mesh

Slide 32

Slide 32 text

Goal › Service Mesh was designed to be that would handle the service communications.

Slide 33

Slide 33 text

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. › Polyglot

Slide 34

Slide 34 text

Service Mesh Features › Sidecar Proxy › Service Discovery & Load Balancing › Circuit Breaking › Fault Injection › Can be used in legacy systems

Slide 35

Slide 35 text

Istio Deployment

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

PILOT Component that programs the Envoy proxies, responsible for service discovery, load balancing, and routing.

Slide 38

Slide 38 text

MIXER Component responsible for enforcing access control and usage policies across the service mesh and collecting telemetry data from Envoy and other services

Slide 39

Slide 39 text

ISTIO ADD-ONs Open-Source components which will work together to provide some additional functionalities

Slide 40

Slide 40 text

Prometheus Grafana Jaeger Open Source

Slide 41

Slide 41 text

Demo Time

Slide 42

Slide 42 text

Use Case - Architecture Diagram