SlideShare una empresa de Scribd logo
1 de 35
Descargar para leer sin conexión
container-solutions.com | @containersoluti | info@container-solutions.com
Distributed Tracing
with ZipKin &
Kubernetes
Maximilian Schöfmann
@schoefmann
Container Solutions AG
@containersoluti
container-solutions.com | @containersoluti | info@container-solutions.com
Microservices...
In short, the microservice architectural style is an approach to develop a single application
as a suite of small services, each running in its own process and communicating with
lightweight mechanisms, often an HTTP resource API. These services are built around
business capabilities and independently deployable by fully automated deployment
machinery. There is a bare minimum of centralized management of these services,
which may be written in different programming languages and use different data storage
technologies.
-- James Lewis and Martin Fowler
www.container-solutions.com | info@container-solutions.com
The “Socks Shop”...
microservices-demo.github.io
www.container-solutions.com | info@container-solutions.com
The “Socks Shop”...
www.container-solutions.com | info@container-solutions.com
Let’s install it in the cluster...
Distributed Tracing | container-solutions.com
Microservice benefits
● Modeling after business domains
● Independent deployment
● Technology diversity
Distributed Tracing | container-solutions.com
Microservice costs
● Distribution
● Eventual Consistency
● Operational complexity
Distributed Tracing | container-solutions.com
Microservice requirements
● Rapid provisioning
● Monitoring
● Rapid deployment
● Autonomous teams
Distributed Tracing | container-solutions.com
Microservice architectures
● Monolithic to microservice architecture
● Apps as a collection of distributed services
● Tools becoming necessary to gather metrics
Distributed Tracing | container-solutions.com
Why distributed tracing?
Example: Google search query
● Multiple index lookups
● Selecting Ads
● Check spelling
● Personalise results
● Filter DMCA takedowns
● Include relevant images...
● ...and videos
● ...and news
● ...
Distributed Tracing | container-solutions.com
Why distributed tracing?
“Per-process logging and metric monitoring have their place, but
neither can reconstruct the elaborate journeys that transactions
take as they propagate across a distributed system.
Distributed traces are these journeys.”
-- Chris Aniszczyk, Cloud Native Computing Foundation
Distributed Tracing | container-solutions.com
Fundamental requirements to make it work
● Ubiquitous deployment
● Continuous monitoring
See also: “Dapper, a Large-Scale Distributed Systems Tracing Infrastructure”
http://research.google.com/pubs/pub36356.html (2010)
Distributed Tracing | container-solutions.com
Requirements to make is useful
● Low overhead
● Application-level transparency
● Scalability
● (Timely) data availability
Distributed Tracing | container-solutions.com
A distributed trace...
“A tracing infrastructure for distributed
services needs to record information
about all the work done in a system, on
behalf of a given initiator”
Distributed Tracing | container-solutions.com
Data aggregation
Message record:
Record = Message identifier + timestamped event
Data aggregation classes:
● Black box
● Annotation-based
Distributed Tracing | container-solutions.com
● Trace as a tree of nested calls
● Trace trees and spans
Trace data model
www.container-solutions.com | info@container-solutions.com
Span
Logged event in a typical span
● Span name
● Span start time
● Span end time
● Trace id
● Span id
● Span parent id
● Any timing information recorded by the instrumentation library (RPC, HTTP)
● Additional custom labels (“foo”)
www.container-solutions.com | info@container-solutions.com
OpenTracing & ZipKin
Common libraries for several programming languages
➔ Libraries attach a trace context to the thread local storage
➔ RPC friendly (specially when using gRPC)
➔ The data is language-independent
opentracing.io zipkin.io
www.container-solutions.com | info@container-solutions.com
Let’s install that also in the cluster...
www.container-solutions.com | info@container-solutions.com
Supported languages
➔ Javascript
➔ Python
➔ Java
➔ Scala
➔ Ruby
➔ C#
➔ Golang
www.container-solutions.com | info@container-solutions.com
Supported frameworks
➔ Express (nodejs - http)
➔ Jersey, RestEasy, JAXRS2, Apache HttpClient, Mysql (Java, HTTP, gRPC)
➔ HDFS, HBASE
➔ Spring, Spring Cloud
➔ Apache Cassandra
➔ Finagle
➔ Rack
➔ Golang Context
➔ GoKit
➔ Akka, Spray, Play
➔ Dropwizard
➔ Roll your own
www.container-solutions.com | info@container-solutions.com
Opentracing Example (Go)
explicitely instrumenting a SQL query in a service written in Go
www.container-solutions.com | info@container-solutions.com
Annotations
● Arbitrary text
● Key/Value pairs
➔Can be used for common vocabulary,
e.g. “http.status_code”, “peer.service”, “sampling.priority”
www.container-solutions.com | info@container-solutions.com
Architecture (ZipKin with Scribe + Cassandra)
www.container-solutions.com | info@container-solutions.com
Performance
Low overhead is the key!
Sampling is the solution!
… at least partially...
www.container-solutions.com | info@container-solutions.com
Sampling
➔ 2-stage sampling:
a. Client: Don’t send every trace instrumented
● limits client-side CPU and bandwidth overhead
● adjustable per service, hard to change in one go
b. Server: Don’t persist every trace received
● limits server-side IO and data volume overhead
● adjustable centrally with simple config change
➔ Adaptive sampling to trade off overhead against missing relevant traces
www.container-solutions.com | info@container-solutions.com
But what about...
● Proprietary services?
● Ancient/Legacy Services?
● 3rd-Party services outside your control?
www.container-solutions.com | info@container-solutions.com
But what about...
● Proprietary services?
● Ancient/Legacy Services?
● 3rd-Party services outside your control?
Proxying!
www.container-solutions.com | info@container-solutions.com
Linkerd overview
● Intelligent, adaptive load-balancing
● Global, fine-grained instrumentation
● Application-centric naming
● Powerful traffic routing mechanisms
www.container-solutions.com | info@container-solutions.com
Some of the answered questions...
...with a distributed tracing system are:
● Which parts of my system are slow?
● Which call pattern can be optimized with parallelization?
● Which calls are redundant?
● Which routes are affected by this failing part?
● Under which circumstances is it failing?
● How often is it failing?
● Detect queries issued to read and write masters,
instead of read only replicas
www.container-solutions.com | info@container-solutions.com
A word of caution about distributed tracing
● Documentation is still rather poor
● Yet another moving part
● Can accumulate huge amounts of data
● Metrics need to be interpreted
● Commercial APM solutions might be an easier route for your use case...
www.container-solutions.com | info@container-solutions.com
A word of caution about distributed tracing
● Documentation is still rather poor
● Yet another moving part
● Can accumulate huge amounts of data
● Metrics need to be interpreted
● Commercial APM solutions might be an easier route for your use case...
www.container-solutions.com | info@container-solutions.com
Demo time...
www.container-solutions.com | info@container-solutions.com
www.container-solutions.com | info@container-solutions.com
Questions? Want to learn more?
● Come to our 2 day tinyurl.com/microservice-workshop
(November 8. + 9. or at your company on request)
● Follow us on Twitter: @containersoluti
● Read more on our blog: container-solutions.com/blog
● Or just get in touch: info@container-solutions.com

Más contenido relacionado

La actualidad más candente

Tracing Microservices with Zipkin
Tracing Microservices with ZipkinTracing Microservices with Zipkin
Tracing Microservices with Zipkin
takezoe
 

La actualidad más candente (19)

Intro to open source observability with grafana, prometheus, loki, and tempo(...
Intro to open source observability with grafana, prometheus, loki, and tempo(...Intro to open source observability with grafana, prometheus, loki, and tempo(...
Intro to open source observability with grafana, prometheus, loki, and tempo(...
 
Distributed Tracing
Distributed TracingDistributed Tracing
Distributed Tracing
 
FluentD for end to end monitoring
FluentD for end to end monitoringFluentD for end to end monitoring
FluentD for end to end monitoring
 
Performance monitoring and call tracing in microservice environments
Performance monitoring and call tracing in microservice environmentsPerformance monitoring and call tracing in microservice environments
Performance monitoring and call tracing in microservice environments
 
OSMC 2018 | Tailored SNMP monitoring – Your own SNMP MIB and sub-agent with P...
OSMC 2018 | Tailored SNMP monitoring – Your own SNMP MIB and sub-agent with P...OSMC 2018 | Tailored SNMP monitoring – Your own SNMP MIB and sub-agent with P...
OSMC 2018 | Tailored SNMP monitoring – Your own SNMP MIB and sub-agent with P...
 
Opentracing jaeger
Opentracing jaegerOpentracing jaeger
Opentracing jaeger
 
Using the FLiPN Stack for Edge AI (Flink, NiFi, Pulsar) - Pulsar Summit Asia ...
Using the FLiPN Stack for Edge AI (Flink, NiFi, Pulsar) - Pulsar Summit Asia ...Using the FLiPN Stack for Edge AI (Flink, NiFi, Pulsar) - Pulsar Summit Asia ...
Using the FLiPN Stack for Edge AI (Flink, NiFi, Pulsar) - Pulsar Summit Asia ...
 
Coap based application for android phones
Coap based application for android phonesCoap based application for android phones
Coap based application for android phones
 
Opentracing 101
Opentracing 101Opentracing 101
Opentracing 101
 
OSMC 2018 | Distributed Tracing FAQ by Gianluca Arbezzano
OSMC 2018 | Distributed Tracing FAQ by Gianluca ArbezzanoOSMC 2018 | Distributed Tracing FAQ by Gianluca Arbezzano
OSMC 2018 | Distributed Tracing FAQ by Gianluca Arbezzano
 
Fluent-bit
Fluent-bitFluent-bit
Fluent-bit
 
Redecentralizing the Web: IPFS and Filecoin
Redecentralizing the Web: IPFS and FilecoinRedecentralizing the Web: IPFS and Filecoin
Redecentralizing the Web: IPFS and Filecoin
 
Search Analytics with ELK (Elastic Stack)
Search Analytics with ELK (Elastic Stack)Search Analytics with ELK (Elastic Stack)
Search Analytics with ELK (Elastic Stack)
 
Introduction to Distributed Tracing
Introduction to Distributed TracingIntroduction to Distributed Tracing
Introduction to Distributed Tracing
 
Lithe: Lightweight Secure CoAP for the Internet of Things
Lithe: Lightweight Secure CoAP for the Internet of ThingsLithe: Lightweight Secure CoAP for the Internet of Things
Lithe: Lightweight Secure CoAP for the Internet of Things
 
Monitoring in a scalable world
Monitoring in a scalable worldMonitoring in a scalable world
Monitoring in a scalable world
 
Fluent Bit
Fluent BitFluent Bit
Fluent Bit
 
Tracing Microservices with Zipkin
Tracing Microservices with ZipkinTracing Microservices with Zipkin
Tracing Microservices with Zipkin
 
Coap based application for android phones-end
Coap based application for android phones-endCoap based application for android phones-end
Coap based application for android phones-end
 

Similar a Distributed Tracing with OpenTracing, ZipKin and Kubernetes

(Current22) Let's Monitor The Conditions at the Conference
(Current22) Let's Monitor The Conditions at the Conference(Current22) Let's Monitor The Conditions at the Conference
(Current22) Let's Monitor The Conditions at the Conference
Timothy Spann
 
nextcomputing-packet-continuum
nextcomputing-packet-continuumnextcomputing-packet-continuum
nextcomputing-packet-continuum
blabadini
 
Kafka Summit 2022: Handling Eventual Consistency in a Transactional World.pdf
Kafka Summit 2022: Handling Eventual Consistency in a Transactional World.pdfKafka Summit 2022: Handling Eventual Consistency in a Transactional World.pdf
Kafka Summit 2022: Handling Eventual Consistency in a Transactional World.pdf
Andrea Gioia
 

Similar a Distributed Tracing with OpenTracing, ZipKin and Kubernetes (20)

Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
 
apidays New York 2022 - Leveraging Event Streaming to Super-Charge your Busin...
apidays New York 2022 - Leveraging Event Streaming to Super-Charge your Busin...apidays New York 2022 - Leveraging Event Streaming to Super-Charge your Busin...
apidays New York 2022 - Leveraging Event Streaming to Super-Charge your Busin...
 
Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !
 
Osacon 2021 hello hydrate! from stream to clickhouse with apache pulsar and...
Osacon 2021   hello hydrate! from stream to clickhouse with apache pulsar and...Osacon 2021   hello hydrate! from stream to clickhouse with apache pulsar and...
Osacon 2021 hello hydrate! from stream to clickhouse with apache pulsar and...
 
Microservices for performance - GOTO Chicago 2016
Microservices for performance - GOTO Chicago 2016Microservices for performance - GOTO Chicago 2016
Microservices for performance - GOTO Chicago 2016
 
Big Data Streams Architectures. Why? What? How?
Big Data Streams Architectures. Why? What? How?Big Data Streams Architectures. Why? What? How?
Big Data Streams Architectures. Why? What? How?
 
Let’s Monitor Conditions at the Conference With Timothy Spann & David Kjerrum...
Let’s Monitor Conditions at the Conference With Timothy Spann & David Kjerrum...Let’s Monitor Conditions at the Conference With Timothy Spann & David Kjerrum...
Let’s Monitor Conditions at the Conference With Timothy Spann & David Kjerrum...
 
(Current22) Let's Monitor The Conditions at the Conference
(Current22) Let's Monitor The Conditions at the Conference(Current22) Let's Monitor The Conditions at the Conference
(Current22) Let's Monitor The Conditions at the Conference
 
Data Streaming with Apache Kafka & MongoDB
Data Streaming with Apache Kafka & MongoDBData Streaming with Apache Kafka & MongoDB
Data Streaming with Apache Kafka & MongoDB
 
nextcomputing-packet-continuum
nextcomputing-packet-continuumnextcomputing-packet-continuum
nextcomputing-packet-continuum
 
Data Streaming with Apache Kafka & MongoDB - EMEA
Data Streaming with Apache Kafka & MongoDB - EMEAData Streaming with Apache Kafka & MongoDB - EMEA
Data Streaming with Apache Kafka & MongoDB - EMEA
 
Webinar: Data Streaming with Apache Kafka & MongoDB
Webinar: Data Streaming with Apache Kafka & MongoDBWebinar: Data Streaming with Apache Kafka & MongoDB
Webinar: Data Streaming with Apache Kafka & MongoDB
 
Captial One: Why Stream Data as Part of Data Transformation?
Captial One: Why Stream Data as Part of Data Transformation?Captial One: Why Stream Data as Part of Data Transformation?
Captial One: Why Stream Data as Part of Data Transformation?
 
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
 
Breaking the Monolith Road to Containers
Breaking the Monolith Road to ContainersBreaking the Monolith Road to Containers
Breaking the Monolith Road to Containers
 
Amazon aws big data demystified | Introduction to streaming and messaging flu...
Amazon aws big data demystified | Introduction to streaming and messaging flu...Amazon aws big data demystified | Introduction to streaming and messaging flu...
Amazon aws big data demystified | Introduction to streaming and messaging flu...
 
PHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
PHP At 5000 Requests Per Second: Hootsuite’s Scaling StoryPHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
PHP At 5000 Requests Per Second: Hootsuite’s Scaling Story
 
Handling eventual consistency in a transactional world with Matteo Cimini and...
Handling eventual consistency in a transactional world with Matteo Cimini and...Handling eventual consistency in a transactional world with Matteo Cimini and...
Handling eventual consistency in a transactional world with Matteo Cimini and...
 
Kafka Summit 2022: Handling Eventual Consistency in a Transactional World.pdf
Kafka Summit 2022: Handling Eventual Consistency in a Transactional World.pdfKafka Summit 2022: Handling Eventual Consistency in a Transactional World.pdf
Kafka Summit 2022: Handling Eventual Consistency in a Transactional World.pdf
 
Introduction to streaming and messaging flume,kafka,SQS,kinesis
Introduction to streaming and messaging  flume,kafka,SQS,kinesis Introduction to streaming and messaging  flume,kafka,SQS,kinesis
Introduction to streaming and messaging flume,kafka,SQS,kinesis
 

Último

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Distributed Tracing with OpenTracing, ZipKin and Kubernetes