Distributed service tracking system

A distributed service tracking system consists of three parts:

  • data collection
  • data storage
  • data demonstration

Depending on the size of the system, each structural part has a certain variation. For example, for large-scale distributed systems, data storage, real-time data can be divided into two parts and the whole amount of data, real-time data for troubleshooting (Trouble Shooting), the full amount of data for system optimization; support platform-independent data collection in addition to and independent of development language data collection system, further comprising an asynchronous data collection (need to track message queue, ensure the continuity of the call), and ensuring less invasive; display data also involves data mining and analysis. Although each part can become very complex, but the basic principles are similar.

Tracking unit tracking service from the client initiates a request (request) was arrived at the border began tracking system, the tracking system to process until a response is returned (response) to the client, known as a  the trace . Each trace in the number of service calls, record calls for what services, as well as time-consuming and so each call information at each service call, buried in a call record, called a  span . In this way, a number of orderly span on the formation of a trace. In the process of the system providing service to the outside world, we will continue to have the request and response occurs, will continue to generate a trace, with a span of these trace record, can depict a service system topology. Comes the response time span, as well as the success of the request and other information, can be in the event of problems, to find unusual services; based on historical data, but also analyze where poor performance, optimize positioning performance goals from the overall system level .

ZipKin is a popular open source distributed tracking system, it mainly has the following four parts:

Collector (collector assembly): external system responsible for collecting trace information, into the interior of Zipkin Span format.
Storage (storage component): mainly responsible for storing trace information received, the default is stored in memory, and storage to support Mysql, Cassandra and ElasticSearch.
API (Query): responsible for querying data stored in the Storage, a simple JSON API provides access to data, primarily to use web UI.
Web UI (display components): provides a simple web interface to facilitate tracking of view and query information, and relevant analysis.
Spring Cloud Sleuth is distributed tracing scheme Spring Could provided, which implements a log to track down the application allows users to add no sense of the situation, and then send it to the remote tracking systems, such as ZipKin. Users simply classPath it into the application, the information can be automatically generated Span, Trace and the like, access HTTP Request, and transmitting the collected information to Zipkin Server.

Guess you like

Origin www.cnblogs.com/doit8791/p/11198743.html