Full link trace methodTechnical field
The present invention relates to link trace field, in particular to full link trace method.
Background technique
Now with the innovation progress of computer technology, network technology, the especially progress of virtualization technology, there are also new generalIt reads, the innovation and development of new departure, the especially development of micro services architecture technology, changes traditional software development and O&M mouldFormula.
Micro services framework solve the problems, such as it is some in traditional layer architecture, its central characteristics be high scalability,It is easy to develop, tests and dispose independent serviced component, it is the decoupling of these serviced components, distributed, mutually independent, it can be withQuick iteration updates the micro services in application platform, and education cloud platform is exactly such a micro services framework.On this basis,In the past to the monitoring mode of single server, need to be changed into based on the monitoring mould mutually called between hundreds and thousands of a examplesFormula.
Summary of the invention
The embodiment of the invention provides the alarm methods and device in link trace system.For the embodiment to disclosureSome aspects have a basic understanding, and simple summary is shown below.The summarized section is not extensive overview, nor wantingIt determines key/critical component or describes the protection scope of these embodiments.Its sole purpose is presented with simple formSome concepts, in this, as the preamble of following detailed description.
The embodiment of the invention provides a kind of full link trace methods, and deployment distributed link calls in education cloud platformMonitoring system provides the external interface of the system;The described method includes:
By the collector of the system, acquisition stores the data of each service transmission;
Store the data;
The data, output tracking result are called by business diagnosis.
Based on the method, as optional first embodiment, the data of each service transmission of storage, comprising:
The data of each service transmission are stored into MySQL.
Based on the method, as optional second embodiment, the output tracking result, comprising:
Output visualization tracing figure.
Based on the second embodiment, as optional 3rd embodiment, the output visualizes tracing figure, comprising:
To the web user interface UI output visualization tracing figure of the education cloud platform.
It is described to dispose distributed link tune in education cloud platform as optional fourth embodiment based on the methodWith monitoring system, comprising:
By Docker container, deployment distributed link calls monitoring system in education cloud platform.
Based on the fourth embodiment, as optional 5th embodiment, the method also includes:
According to the operation of the Docker container mirror image internal program, adjust what the Docker container mirror image internal program usedResource.
Any one based on the method, the second embodiment into the 5th embodiment, the data include:At least one corresponding working cell of each service;
The working cell record time, track path mark.
In the embodiment of the present invention, by the deployment distributed link calling monitoring system in education cloud platform, it may be implementedFull link trace solves the disadvantages of fault location under micro services is difficult, the wasting of resources is more, link combs hardly possible.Further, due to dividingCloth link calls monitoring system itself to have the characteristics that transparent, low overhead, expansible, improves the service in education cloud platformStability and high availability reduce the operation cost of cloud platform.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, notIt can the limitation present invention.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the inventionExample, and be used to explain the principle of the present invention together with specification.
Fig. 1 is the full link trace method flow diagram shown in an exemplary embodiment;
Fig. 2 is the full link trace method flow diagram shown in an exemplary embodiment;
Fig. 3 is that the link in the full link trace method shown in an exemplary embodiment calls schematic diagram.
Specific embodiment
The following description and drawings fully show specific embodiments of the present invention, to enable those skilled in the art toPractice them.Embodiment only represents possible variation.Unless explicitly requested, otherwise individual components and functionality is optional, andAnd the sequence of operation can change.The part of some embodiments and feature can be included in or replace other embodimentsPart and feature.The range of embodiment of the present invention includes the entire scope of claims and the institute of claimsThere is obtainable equivalent.Herein, each embodiment can individually or generally be indicated that this is only with term " invention "It is merely for convenience, and if in fact disclosing the invention more than one, it is not meant to automatically limit the range of the applicationFor any single invention or inventive concept.Herein, relational terms such as first and second and the like are used only for oneEntity, which is perhaps operated, to be distinguished and exists without requiring or implying between these entities or operation with another entity or operationAny actual relationship or sequence.Moreover, the terms "include", "comprise" or its any other variant be intended to it is non-exclusiveProperty include so that include a series of elements process, method or equipment not only include those elements, but also includingOther elements that are not explicitly listed.Each embodiment herein is described in a progressive manner, and each embodiment stressesBe the difference from other embodiments, the same or similar parts in each embodiment may refer to each other.
In one exemplary embodiment, in full link trace method, deployment distributed link is called in education cloud platformSystem Zipkin, and the external interface of the system is provided.
As shown in Figure 1, full link trace method includes the following steps.
In a step 11, by the collector of system, acquisition stores the data of each service transmission.
In step 12, the data of acquisition are stored.
In step 13, the data of storage, output tracking result are called by business diagnosis.
As it can be seen that in the present exemplary embodiment, by disposing Zipkin in education cloud platform, may be implemented full link withTrack solves the disadvantages of fault location under micro services is difficult, the wasting of resources is more, link combs hardly possible.Further, due to Zipkin itselfHave the characteristics that transparent, low overhead, expansible, improves service stability and high availability in education cloud platform, reduceThe operation cost of cloud platform.
In one exemplary embodiment, by Docker container, deployment distributed link calls monitoring in education cloud platformSystem Zipkin, and external interface is provided.
As shown in Fig. 2, full link trace method includes the following steps.
In step 21, the data of each service transmission are acquired by the collector Collection of Zipkin.
In this step, the data of each service transmission include: at least one working cell Span corresponding to each service.It is above-mentionedSpan is equivalent to a solicited message in server, and one time link calling will create a Span, can pass through one 64Mark for marking Span.Span is constantly started and stopped, while having recorded temporal information and track path Trace mark.Above-mentioned Trace is equivalent to the Span set of tree construction, identifies a calling link.
Fig. 3 is that the link in full link trace method shown by an exemplary embodiment calls schematic diagram, in the citingIn, service 2 is called in service 1, and service 3 and service 4 are called in service 2.
In step 22, the data of acquisition are stored.
In this step, the data of acquisition be can store in MySQL.
In step 23, the data of storage, output visualization tracking result are called by business diagnosis.
In this step, the data of storage are inquired, after calling by business diagnosis, obtain tracking result.Tracking result it is defeatedVisual mode can be used out, such as exports visual tracing figure.Further, it is possible to be used to the webpage of education cloud platformFamily interface (User Interface, english abbreviation UI) exports visualization view.
As it can be seen that by the way that Zipkin is deployed in education cloud platform, from the point of view of certain time period is by a certain event, so that it mayThe problem of to know the calling and dependence between each service, realizing full link trace, finding service in time, after beingContinuous solution and governing problem provide foundation.
In step 24, according to the operation of the Docker container mirror image internal program, the Docker container mirror image is adjustedThe resource that internal program uses.
In this step, according to the practical operation situation of Docker container mirror image internal program, Docker appearance can be adjusted at any timeResource used in device mirror image internal program, such as the usage quantity of adjustment central processing unit (CPU), memory.It is actual to meetBusiness demand, while system resource can also be saved.
It should be understood that the invention is not limited to the process and structure that are described above and are shown in the accompanying drawings,And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is only limited by the attached claimsSystem.