Best Tools/Open Source Libs

Use Zipkin distributed tracing system to troubleshoot latency problems

Zipkin is a distributed tracing system. It helps gather /manage timing data needed to troubleshoot latency problems in microservice architectures. Twitter developed the technology using a Google paper that described Google’s internally-built distributed app debugger, Dapper.

In the Microservices architecture, application is usually structured as a set of loosely coupled, collaborating services. Each service implements a set of related functions. For example, an application might consist of services such as the order management service, the customer management service, etc. Services communicate using either synchronous protocols such as HTTP/REST or asynchronous protocols such as AMQP. Services can be developed and deployed independently of one another. Each service has its own database in order to be decoupled from other services. For more intro on Microservice, check out here.

Services requests often span multiple services. Each service handles a request by performing one or more operations, e.g. database queries, publishes messages, etc. To understand the behavior of an application and troubleshoot problems there is a need to monitor each service but if you use any of the external monitoring tools, it only tells you the overall response time and number of invocations but there would be no insight into the individual operations. To understand how each service is performing we would need to instrument services with code that will do the following

  1. Assign each external request a unique external request id
  2. Pass the external request id to all services that are involved in handling the request
  3. Include the external request id in all log messages
  4. Record information (e.g. start time, end time) about the requests and operations performed when handling an external request in a centralized service.

Applications are instrumented to report timing data to Zipkin server. The Zipkin UI presents a Dependency diagram showing how many traced requests went through each application. If you are troubleshooting latency problems or errors, you can filter or sort all traces based on the application, length of trace, annotation, or timestamp. Once you select a trace, you can see the % of the total trace time each span takes.

Whenever a request comes in, Zipkin application traces it as it goes through the system. Each request gets a unique identifier, which is passed along with the request to each microservice. For Zipkin to work, each microservice is instrumented with Zipkin library that the service then uses to identify the request’s entry and exit ports. Libraries are available for C#, Java, JavaScript, Python, Go, Scala and Ruby.

Request data is transmitted back to a Zipkin server, which is captured by Node.js and stored in Cassandra. It is left to the user to establish the communication protocol between the emitter and the collector; for his class, Gehard uses RabbitMQ. Scribe, HTTP, and Kafka are also recommended as transport mechanisms.

Zipkin comes with a Web interface that shows the amount of traffic each microservice instance is getting. The log data can be filtered by application, length of trace, annotation, or timestamp.

Below is Intro video :

Checkout Quickstart to get started.

Like this post? Don’t forget to share it!

Useful Resources :

Summary
Article Name
Use Zipkin distributed tracing system to troubleshoot latency problems
Description
Zipkin is a distributed tracing system. It helps gather /manage timing data needed to troubleshoot latency problems in microservice architectures.
Author
Publisher Name
Upnxtblog
Publisher Logo
Karthik

Allo! My name is Karthik,experienced IT professional.Upnxtblog covers key technology trends that impacts technology industry.This includes Cloud computing,Blockchain,Machine learning & AI,Best mobile apps, Best tools/open source libs etc.,I hope you would love it and you can be sure that each post is fantastic and will be worth your time.

Share
Published by
Karthik

Recent Posts

Navigating Volatility: Investing in Crypto Derivatives and Risk Management Strategies

The cryptocurrency market is famed for its volatility, presenting each opportunity and demanding situations for…

1 week ago

How Game Developers Use AI in Mobile Games in 2024?

Games since time immemorial have been winning at captivating the users and teleporting them onto…

1 week ago

The Impact of AI on Software Development

We are living within an innovation curve wherein cutting-edge technologies are making a hustle and…

2 weeks ago

AI Tools for Research Paper Writing: Learn What They Can Do

Whether it’s the healthcare industry or the automobile sector, artificial intelligence has left its impact…

3 weeks ago

Embracing Innovation: 5 Ways AI is Transforming the Landscape in 2024

Facts only- The big Artificial Intelligence push is unraveling in 2024. No, it wasn’t merely…

4 weeks ago

The Startup Guide to Acquiring Exceptional Developers

In the fiercely competitive world of Hire Developers for Startup, success hinges not just on…

1 month ago

This website uses cookies.