SlideShare a Scribd company logo
1 of 66
Z I P K I N
A distributed tracing framework
Why Zipkin?
Google



0.5 sec slower



20% traffic drop


                  @skr | @thisisfranklin   3
Google



0.5 sec slower    1.5 sec faster



20% traffic drop   CTR up 12%


                               @skr | @thisisfranklin   3
Performance matters
Front end




            @skr | @thisisfranklin   5
Front end   Back end




                   @skr | @thisisfranklin   5
@skr | @thisisfranklin   6
@skr | @thisisfranklin   6
@skr | @thisisfranklin   7
@skr | @thisisfranklin   8
Picture from http://www.flickr.com/photos/jpellgen
@skr | @thisisfranklin   9
• Collects traces from production requests
• Low overhead
• Minimum of extra work for developers




                                             @skr | @thisisfranklin   9
Finagle
“Finagle is an asynchronous network stack for the JVM that you can use to build
asynchronous Remote Procedure Call (RPC) clients and servers in Java, Scala, or
any JVM-hosted language.”


                         github.com/twitter/finagle
@skr | @thisisfranklin   11
Finagle Http service




                       @skr | @thisisfranklin   11
Finagle Http service




                       @skr | @thisisfranklin   11
Finagle Http service



Finagle Thrift Service




                                          @skr | @thisisfranklin   11
Finagle Http service



Finagle Thrift Service




                                          @skr | @thisisfranklin   11
Finagle Http service



Finagle Thrift Service




                                          @skr | @thisisfranklin   11
Finagle Http service



Finagle Thrift Service                Service




                                                @skr | @thisisfranklin   11
Finagle Http service



Finagle Thrift Service                Service




                                                @skr | @thisisfranklin   11
Finagle Http service



Finagle Thrift Service                Service




                                                @skr | @thisisfranklin   11
Zipkin terminology
‣   Annotation: string data associated with a particular timestamp, service, and
    host


                                        Time



         time: 2012-01-21 22:37:01
         value: “something happened”
         server: 135.34.53.2
         service: “timelineservice”




                                                                           @skr | @thisisfranklin   12
‣   Span: represents one specific method call; made up of a set of annotations.
    Has a name and an id.
                                        Time

         T:0ms Client Send



                                        Span




                                                                           @skr | @thisisfranklin   13
‣   Span: represents one specific method call; made up of a set of annotations.
    Has a name and an id.
                                        Time

         T:0ms Client Send



                                        Span


             T:10ms Server Receive




                                                                           @skr | @thisisfranklin   13
‣   Span: represents one specific method call; made up of a set of annotations.
    Has a name and an id.
                                        Time

         T:0ms Client Send



                                        Span


             T:10ms Server Receive                        T:90ms Server Send




                                                                               @skr | @thisisfranklin   13
‣   Span: represents one specific method call; made up of a set of annotations.
    Has a name and an id.
                                        Time

         T:0ms Client Send                               T:100ms Client Receive



                                        Span


             T:10ms Server Receive                        T:90ms Server Send




                                                                                  @skr | @thisisfranklin   13
‣   Span: represents one specific method call; made up of a set of annotations.
    Has a name and an id.
                                               Time

         T:0ms Client Send                                            T:100ms Client Receive



                                               Span

                                     T:20ms Read 30 kbytes from file
             T:10ms Server Receive                                     T:90ms Server Send




                                                                                               @skr | @thisisfranklin   13
‣   Span: represents one specific method call; made up of a set of annotations.
    Has a name and an id.
                                               Time

         T:0ms Client Send                                            T:100ms Client Receive



                                               Span

                                     T:20ms Read 30 kbytes from file
             T:10ms Server Receive                                     T:90ms Server Send



‣   Trace: a set of spans all associated with the same request


                                                                                               @skr | @thisisfranklin   13
Finagle
 http
service




          @skr | @thisisfranklin   14
• Generate a random i64 trace id
                                   Finagle
                                    http
                                   service




                                             @skr | @thisisfranklin   14
• Generate a random i64 trace id
• Decide if we should sample the
trace or not                       Finagle
                                    http
                                   service




                                             @skr | @thisisfranklin   14
• Generate a random i64 trace id
• Decide if we should sample the
trace or not                       Finagle
                                    http
                                   service




                                   Finagle
                                    thrift
                                   service



                                             @skr | @thisisfranklin   14
• Generate a random i64 trace id
• Decide if we should sample the
trace or not                       Finagle
                                    http
                                   service

• Generate new span id


                                   Finagle
                                    thrift
                                   service



                                             @skr | @thisisfranklin   14
• Generate a random i64 trace id
• Decide if we should sample the
trace or not                       Finagle
                                    http
                                   service

• Generate new span id
• Pass trace header

                                   Finagle
                                    thrift
                                   service



                                             @skr | @thisisfranklin   14
• Generate a random i64 trace id
• Decide if we should sample the
trace or not                       Finagle
                                    http     struct RequestHeader {
                                   service     i64 trace_id,
                                               i64 span_id,
• Generate new span id                         optional i64 parent_span_id,
• Pass trace header
                                               optional bool sampled
                                             }
                                   Finagle
                                    thrift
                                   service



                                                                 @skr | @thisisfranklin   14
• Generate a random i64 trace id
• Decide if we should sample the
trace or not                            Finagle
                                         http     struct RequestHeader {
                                        service     i64 trace_id,
                                                    i64 span_id,
• Generate new span id                              optional i64 parent_span_id,
• Pass trace header
                                                    optional bool sampled
                                                  }
                                        Finagle
• Thrift service adopts trace id from    thrift
header if it exists                     service



                                                                      @skr | @thisisfranklin   14
Finagle
 http
service




Finagle
 thrift
service




          @skr | @thisisfranklin   14
Finagle
           http
          service




Finagle   Finagle
 thrift    thrift
service   service




                    @skr | @thisisfranklin   14
Finagle
           http
          service




Finagle   Finagle
 thrift    thrift
service   service



                    Finagle
                     thrift
                    service

                              @skr | @thisisfranklin   14
Finagle
            http
          service
          S




Finagle   Finagle
 thrift    thrift
S
service   service
          S



                    Finagle
                     thrift
                    S
                    service

                              @skr | @thisisfranklin   14
Finagle
            http
          service
          S

                               Zipkin
                              collector


Finagle   Finagle
 thrift    thrift
S
service   service
          S
                              Cassandra


                    Finagle
                     thrift
                    S
                    service

                                          @skr | @thisisfranklin   14
Finagle
            http
          service
          S

                               Zipkin
                              collector


Finagle   Finagle
 thrift    thrift
S
service   service
          S                               Zipkin        Zipkin
                              Cassandra
                                          Query           UI

                    Finagle
                     thrift
                    S
                    service

                                                   @skr | @thisisfranklin   14
Finagle ♥ Zipkin
Finagle Thrift server

       ServerBuilder()
        .bindTo(address)
        .codec(ThriftServerFramedCodec())
        .name("servicename")
        .build(someService)




                                            @skr | @thisisfranklin   16
Finagle Thrift server

       ServerBuilder()
        .bindTo(address)
        .codec(ThriftServerFramedCodec())
        .name("servicename")
        .build(someService)




                                            @skr | @thisisfranklin   16
Finagle Thrift server

       ServerBuilder()
        .bindTo(address)
        .codec(ThriftServerFramedCodec())
        .name("servicename")
        .build(someService)




                                            @skr | @thisisfranklin   16
Finagle Thrift server

       ServerBuilder()
        .bindTo(address)
        .codec(ThriftServerFramedCodec())
        .name("servicename")
        .build(someService)




                                            @skr | @thisisfranklin   16
Finagle Http server

       ServerBuilder()
        .bindTo(address)
        .codec(Http())
        .name("servicename")
        .build(someService)




                               @skr | @thisisfranklin   17
ServerBuilder()
 .bindTo(address)
 .codec(ThriftServerFramedCodec())
 .name("servicename")
 .tracerFactory(ZipkinTracer())
 .build(someService)




                                     @skr | @thisisfranklin   18
ClientBuilder()
 .cluster(hosts)
 .codec(ThriftServerFramedCodec())
 .name("clientname")
 .tracerFactory(ZipkinTracer())
 .build(someService)




                                     @skr | @thisisfranklin   19
Trace.record("doing stuff")




                              @skr | @thisisfranklin   20
Trace.record("doing stuff")




                              @skr | @thisisfranklin   20
Trace.record("doing stuff")



   time: 2012-01-21 22:37:01
   value: “doing stuff”
   server: 135.34.53.2
   service: “timelineservice”




                                @skr | @thisisfranklin   20
Trace.recordBinary("key", data)




                                  @skr | @thisisfranklin   21
Key           Value


Trace.recordBinary("key", data)   responsecode       500


                                  cache:somekey      Hit


                                    sql.query     select *...



                                                      @skr | @thisisfranklin   21
Platform    Protocol   Client   Server
 Finagle     Thrift     Yes      Yes
 Finagle     HTTP       Yes      Yes
 Finagle    Memcache    Yes      No
 Finagle     Redis      Yes      No
 Cassie      Thrift     Yes      No
Querulous    JDBC       Yes      No
  Ruby       Thrift     Yes      Yes
                                       @skr | @thisisfranklin   22
Zipkin UI
@skr | @thisisfranklin   24
@skr | @thisisfranklin   24
@skr | @thisisfranklin   24
What did we find?
github.com/twitter/zipkin
     @zipkinproject
                            @skr | @thisisfranklin   27

More Related Content

Recently uploaded

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 

Recently uploaded (20)

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 

Featured

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 

Featured (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

Zipkin Distributed Tracing Framework

  • 1. Z I P K I N A distributed tracing framework
  • 3. Google 0.5 sec slower 20% traffic drop @skr | @thisisfranklin 3
  • 4. Google 0.5 sec slower 1.5 sec faster 20% traffic drop CTR up 12% @skr | @thisisfranklin 3
  • 6. Front end @skr | @thisisfranklin 5
  • 7. Front end Back end @skr | @thisisfranklin 5
  • 11. @skr | @thisisfranklin 8 Picture from http://www.flickr.com/photos/jpellgen
  • 13. • Collects traces from production requests • Low overhead • Minimum of extra work for developers @skr | @thisisfranklin 9
  • 14. Finagle “Finagle is an asynchronous network stack for the JVM that you can use to build asynchronous Remote Procedure Call (RPC) clients and servers in Java, Scala, or any JVM-hosted language.” github.com/twitter/finagle
  • 16. Finagle Http service @skr | @thisisfranklin 11
  • 17. Finagle Http service @skr | @thisisfranklin 11
  • 18. Finagle Http service Finagle Thrift Service @skr | @thisisfranklin 11
  • 19. Finagle Http service Finagle Thrift Service @skr | @thisisfranklin 11
  • 20. Finagle Http service Finagle Thrift Service @skr | @thisisfranklin 11
  • 21. Finagle Http service Finagle Thrift Service Service @skr | @thisisfranklin 11
  • 22. Finagle Http service Finagle Thrift Service Service @skr | @thisisfranklin 11
  • 23. Finagle Http service Finagle Thrift Service Service @skr | @thisisfranklin 11
  • 24. Zipkin terminology ‣ Annotation: string data associated with a particular timestamp, service, and host Time time: 2012-01-21 22:37:01 value: “something happened” server: 135.34.53.2 service: “timelineservice” @skr | @thisisfranklin 12
  • 25. Span: represents one specific method call; made up of a set of annotations. Has a name and an id. Time T:0ms Client Send Span @skr | @thisisfranklin 13
  • 26. Span: represents one specific method call; made up of a set of annotations. Has a name and an id. Time T:0ms Client Send Span T:10ms Server Receive @skr | @thisisfranklin 13
  • 27. Span: represents one specific method call; made up of a set of annotations. Has a name and an id. Time T:0ms Client Send Span T:10ms Server Receive T:90ms Server Send @skr | @thisisfranklin 13
  • 28. Span: represents one specific method call; made up of a set of annotations. Has a name and an id. Time T:0ms Client Send T:100ms Client Receive Span T:10ms Server Receive T:90ms Server Send @skr | @thisisfranklin 13
  • 29. Span: represents one specific method call; made up of a set of annotations. Has a name and an id. Time T:0ms Client Send T:100ms Client Receive Span T:20ms Read 30 kbytes from file T:10ms Server Receive T:90ms Server Send @skr | @thisisfranklin 13
  • 30. Span: represents one specific method call; made up of a set of annotations. Has a name and an id. Time T:0ms Client Send T:100ms Client Receive Span T:20ms Read 30 kbytes from file T:10ms Server Receive T:90ms Server Send ‣ Trace: a set of spans all associated with the same request @skr | @thisisfranklin 13
  • 31. Finagle http service @skr | @thisisfranklin 14
  • 32. • Generate a random i64 trace id Finagle http service @skr | @thisisfranklin 14
  • 33. • Generate a random i64 trace id • Decide if we should sample the trace or not Finagle http service @skr | @thisisfranklin 14
  • 34. • Generate a random i64 trace id • Decide if we should sample the trace or not Finagle http service Finagle thrift service @skr | @thisisfranklin 14
  • 35. • Generate a random i64 trace id • Decide if we should sample the trace or not Finagle http service • Generate new span id Finagle thrift service @skr | @thisisfranklin 14
  • 36. • Generate a random i64 trace id • Decide if we should sample the trace or not Finagle http service • Generate new span id • Pass trace header Finagle thrift service @skr | @thisisfranklin 14
  • 37. • Generate a random i64 trace id • Decide if we should sample the trace or not Finagle http struct RequestHeader { service i64 trace_id, i64 span_id, • Generate new span id optional i64 parent_span_id, • Pass trace header optional bool sampled } Finagle thrift service @skr | @thisisfranklin 14
  • 38. • Generate a random i64 trace id • Decide if we should sample the trace or not Finagle http struct RequestHeader { service i64 trace_id, i64 span_id, • Generate new span id optional i64 parent_span_id, • Pass trace header optional bool sampled } Finagle • Thrift service adopts trace id from thrift header if it exists service @skr | @thisisfranklin 14
  • 39. Finagle http service Finagle thrift service @skr | @thisisfranklin 14
  • 40. Finagle http service Finagle Finagle thrift thrift service service @skr | @thisisfranklin 14
  • 41. Finagle http service Finagle Finagle thrift thrift service service Finagle thrift service @skr | @thisisfranklin 14
  • 42. Finagle http service S Finagle Finagle thrift thrift S service service S Finagle thrift S service @skr | @thisisfranklin 14
  • 43. Finagle http service S Zipkin collector Finagle Finagle thrift thrift S service service S Cassandra Finagle thrift S service @skr | @thisisfranklin 14
  • 44. Finagle http service S Zipkin collector Finagle Finagle thrift thrift S service service S Zipkin Zipkin Cassandra Query UI Finagle thrift S service @skr | @thisisfranklin 14
  • 46. Finagle Thrift server ServerBuilder() .bindTo(address) .codec(ThriftServerFramedCodec()) .name("servicename") .build(someService) @skr | @thisisfranklin 16
  • 47. Finagle Thrift server ServerBuilder() .bindTo(address) .codec(ThriftServerFramedCodec()) .name("servicename") .build(someService) @skr | @thisisfranklin 16
  • 48. Finagle Thrift server ServerBuilder() .bindTo(address) .codec(ThriftServerFramedCodec()) .name("servicename") .build(someService) @skr | @thisisfranklin 16
  • 49. Finagle Thrift server ServerBuilder() .bindTo(address) .codec(ThriftServerFramedCodec()) .name("servicename") .build(someService) @skr | @thisisfranklin 16
  • 50. Finagle Http server ServerBuilder() .bindTo(address) .codec(Http()) .name("servicename") .build(someService) @skr | @thisisfranklin 17
  • 51. ServerBuilder() .bindTo(address) .codec(ThriftServerFramedCodec()) .name("servicename") .tracerFactory(ZipkinTracer()) .build(someService) @skr | @thisisfranklin 18
  • 52. ClientBuilder() .cluster(hosts) .codec(ThriftServerFramedCodec()) .name("clientname") .tracerFactory(ZipkinTracer()) .build(someService) @skr | @thisisfranklin 19
  • 53. Trace.record("doing stuff") @skr | @thisisfranklin 20
  • 54. Trace.record("doing stuff") @skr | @thisisfranklin 20
  • 55. Trace.record("doing stuff") time: 2012-01-21 22:37:01 value: “doing stuff” server: 135.34.53.2 service: “timelineservice” @skr | @thisisfranklin 20
  • 56. Trace.recordBinary("key", data) @skr | @thisisfranklin 21
  • 57. Key Value Trace.recordBinary("key", data) responsecode 500 cache:somekey Hit sql.query select *... @skr | @thisisfranklin 21
  • 58. Platform Protocol Client Server Finagle Thrift Yes Yes Finagle HTTP Yes Yes Finagle Memcache Yes No Finagle Redis Yes No Cassie Thrift Yes No Querulous JDBC Yes No Ruby Thrift Yes Yes @skr | @thisisfranklin 22
  • 63.
  • 64.
  • 65. What did we find?
  • 66. github.com/twitter/zipkin @zipkinproject @skr | @thisisfranklin 27

Editor's Notes

  1. Talk more about what tracing is. Compare in process profiling to distributed system?\n
  2. Before we get into what Zipkin is: why we created it\n
  3. Shit is slow, you lose users and money\n
  4. \n
  5. Simplify wildly, there are two parts to web performance\nFront end. The order assets are loaded, minifying and other tricsk\nBack end. How quickly can we generate and push out the HTML/JSON/whatever\n
  6. For the front end we have these nice development tools. Shows us how the assets loaded, what it was waiting for and so on.\nWe want a fancy tool like this for the backend.\nPicked a page where server side was unusually bad, normally it’s mostly FE\n
  7. For the back end we only had these graphs to look at per service.\nNothing that ties them together\n
  8. Capture information about how services in a datacentre is working together to respond to a request. \n
  9. Read this paper from Google called Dapper\n
  10. Read this paper from Google called Dapper\n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. Mention that Cassandra and Scribe can both be replaced. Zookeeper coordination?\n
  27. Mention that Cassandra and Scribe can both be replaced. Zookeeper coordination?\n
  28. Mention that Cassandra and Scribe can both be replaced. Zookeeper coordination?\n
  29. Mention that Cassandra and Scribe can both be replaced. Zookeeper coordination?\n
  30. Mention that Cassandra and Scribe can both be replaced. Zookeeper coordination?\n
  31. Mention that Cassandra and Scribe can both be replaced. Zookeeper coordination?\n
  32. Mention that Cassandra and Scribe can both be replaced. Zookeeper coordination?\n
  33. Mention that Cassandra and Scribe can both be replaced. Zookeeper coordination?\n
  34. Mention that Cassandra and Scribe can both be replaced. Zookeeper coordination?\n
  35. Mention that Cassandra and Scribe can both be replaced. Zookeeper coordination?\n
  36. Mention that Cassandra and Scribe can both be replaced. Zookeeper coordination?\n
  37. Mention that Cassandra and Scribe can both be replaced. Zookeeper coordination?\n
  38. Mention that Cassandra and Scribe can both be replaced. Zookeeper coordination?\n
  39. Mention that Cassandra and Scribe can both be replaced. Zookeeper coordination?\n
  40. Mention that Cassandra and Scribe can both be replaced. Zookeeper coordination?\n
  41. Mention that Cassandra and Scribe can both be replaced. Zookeeper coordination?\n
  42. Mention that Cassandra and Scribe can both be replaced. Zookeeper coordination?\n
  43. Mention that Cassandra and Scribe can both be replaced. Zookeeper coordination?\n
  44. Mention that Cassandra and Scribe can both be replaced. Zookeeper coordination?\n
  45. Mention that Cassandra and Scribe can both be replaced. Zookeeper coordination?\n
  46. \n
  47. Mention dependency on finagle-zipkin\n
  48. Mention dependency on finagle-zipkin\n
  49. Mention dependency on finagle-zipkin\n
  50. Mention dependency on finagle-zipkin\n
  51. Mention dependency on finagle-zipkin\n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. Trace view\nServices on the left. Time scale on top. Least impactful parts of trace collapsed automatically.\nMention bootstrap and dj\n
  62. \n
  63. It’s all open source, check it out now.\n