laitimes

A simple experience of the distributed tracking system skywalking

author:The programmer's bitter coffee

1. Introduction

With the popularity of microservice architecture, some problems under the microservice architecture will become more and more prominent, such as a request will involve multiple services, and the service itself may also rely on other services, the entire request path constitutes a mesh call chain, and once a node in the entire call chain is abnormal, the stability of the entire call chain will be affected. Faced with the above situation, we need some tools that can help understand system behavior and analyze performance problems, so that when failures occur, we can quickly locate and solve problems, and then APM (Application Performance Management) tools came into being. Among the many APM tools, SkyWalking is an excellent domestic APM tool, including distributed tracking, performance index analysis, application and service dependency analysis, etc.

A simple experience of the distributed tracking system skywalking

2. Download

Download skywalking, you can download it from Apache's official website: https://skywalking.apache.org/, if you dislike the slow network speed, you can also reply to "skywalking" in private message to get it.

A simple experience of the distributed tracking system skywalking

3. Introduction

We downloaded and unzipped the skywalking package, the version downloaded here is 8.2.0, and the directory after the extraction is as follows:

A simple experience of the distributed tracking system skywalking

Among the main package descriptions:

Agent directory - to be copied to the machine where each service is located for use as a probe;

bin directory - is the service startup script;

Config directory - is the configuration file;

oap-libs directory - is the jar package required for the oap service to run;

Webapp Directory - is the jar package required for the web service to run.

For the collected data, you need to choose a kind of storage, otherwise the data in memory will be rejected after a long time. Available storage options are H2, ElasticSearch, MySQL, TiDB, And InfluxDB.

4. Use

Start the skywalking service, go to his bin directory, Windows starts with start .bat script, and Linux systems start with start.sh:

A simple experience of the distributed tracking system skywalking
After startup, 2 services, a collector service, a web service will be risen:
A simple experience of the distributed tracking system skywalking
Thus the server side of skywalking is launched. For the microservice to be monitored, it is a client that belongs to skywalking to collect data, we must copy the agent directory to the server that needs to be monitored, and add javaagent and skywalking collector addresses to the startup script, as follows:

-javaagent:D:\skywalking\apache-skywalking-apm-8.2.0\apache-skywalking-apm-bin\agent\skywalking-agent.jar 
 -Dskywalking.agent.service_name=local-service-name 
 -Dskywalking.collector.backend_service=127.0.0.1:11800           
A simple experience of the distributed tracking system skywalking

Start the service, you can view the service calls and monitoring in the UI interface provided by skywalking, the address default is http://ip:8080:

A simple experience of the distributed tracking system skywalking
A simple experience of the distributed tracking system skywalking
A simple experience of the distributed tracking system skywalking

Read on