After more than a year of development and testing, IStio released version 1.0 on July 31, Beijing time, and announced that version 1.0 is ready for production. The main functions of ISTIO have been covered in great detail in previous articles, and there will be more articles to analyze the principles and practical functions. The service we are going to focus on today is ISTIO traffic monitoring capability.

We know that each POD has an Envoy inside it that has the ability to manage, authenticate, and control the flow of traffic into and out of the POD. Mixer is responsible for access control and telemetry information collection.

1. Application and indicators of Prometheus

Prometheus is an open source monitoring and alarm system, added to CNCF in 2016, which is gaining popularity for its flexible search language, efficient data storage, and multi-dimensional data model. Istio has included Prometheus by default since 0.8, and we can see the status and address of Prometheus by querying service or POD. Click on the Prometheus interface, and the UI is very clean.

istio_requests_total

2. Use and introduction of Jaeger UI

Istio and Jaeger can solve the end-to-end distributed tracking problem. Jaeger became a member of CNCF in September 2017. Jaeger is an open source distributed tracking system powered by the Google Dapper and OpenZipkin communities.

istio/chart/pilot/templates/deployment.yaml

deployment istio-pilot

PILOT_TRACE_SAMPLING

jaeger UI

PILOT_TRACE_SAMPLING

After a few moments, we use the script curl ProductPage 10 times. Select ProductPage on the Jaeger UI again, select the past hour, click Find Trace, and you will see that only 4 traces have been detected this time. We run it again with the same script and find 10 traces detected. So far we have curl Product Page 20 times and obtained 10 trace times in total, 50% of the total times.

Now we use the same method, change PILOT_TRACE_SAMPLING to 100% and wait a moment. Curl product page 10 times with the same script curl 10 times with the same script curl product page 10 times with the same script curl 10 times with the same script curl product page 10 times with the same script curl Find Trace Prove that PILOT_TRACE_SAMPLING will collect all requests after modification.

3. Huawei cloud ISTIO service provides a concise monitoring description

In addition to basic monitoring such as CPU usage and memory usage, Huawei cloud provides two other simple traffic monitoring items, namely RPS (average number of requests processed) and RT (Average response delay). The RPS unit is minutes, and the vertical axis is the number of requests processed. Users can view the number of requests processed per unit of time. If the RPS is too high, users can take appropriate measures to report the efficient processing of the request.

Coarse-grained traffic monitoring

Istio offers many plug-and-play services that allow users to reap the benefits of Istio without having to modify their own code or rebuild their own applications. Visual monitoring services and modifiable monitoring content help users better understand the working status of their applications. This article has only covered the basics of ISTIO monitoring, but there is much more to monitoring services that users need to explore and use. Istio is like a gold mine, and the gold belongs only to the diligent prospector.