Tools jpOwl a high-performance back-end service monitoring, dynamic configuration policy rules package

Design Architecture

jpOwl client is written in java language from which demands a simple API, high reliability, under any scenario the client can not affect the performance of the business services. Buried designed to provide rich functionality and data acquisition for each business line.

Use ThreadLocal in the collection of data for each thread to use that variable will provide a copy of a variable value in Java is a more special thread binding mechanism, every thread can independently change their copy, not a copy of conflict and other threads.

As shown, when the execution of business logic, will put the corresponding monitoring requests stored in the ThreadContext, ThreadContext actually a supervision tree structure. At the end of the last business thread execution, the monitored object asynchronously into a memory queue, jpOwl there is a thread consumption data in the queue asynchronously sent to third-party storage engine.

Value and Benefits

value

  • Reduce fault detection time
  • Reduce the cost of fault location
  • Helper application optimization
  • Monitoring data is full statistics, jpOwl support pre-calculated data
  • Link data sample is calculated

Advantage

  • Real-time processing: the value of information will be dropped over time, so the need to quickly collect information
  • Full amount of data: collect the full amount of index data to facilitate in-depth analysis Failure Case
  • Fault tolerance: failure does not affect the normal operation of the business, the business transparent
  • High throughput: massive surveillance to collect data, you need to do to ensure high throughput

Business model monitoring

jpOwl supports the following four main monitor model:

  • Transaction suitable for recording the program access behavior across system boundaries, such as long-distance calls, database calls, but also for a long time to execute business logic monitor, Transaction used to record the execution time and the number of times a piece of code.
  • Event used to record the number of times something happens, such as records system abnormalities, which compared to the lack of statistics and transaction time, cost less than the transaction.
  • Heartbeat represents the statistics generated within the program periodically, such as CPU utilization, memory utilization, connection pool status, system load.
  • Metric for recording traffic indicators, indicators may include an indicator of the number of records, recording the average value, the sum of the recording, the statistical traffic index of the lowest particle size of 1 min.

News tree

jpOwl monitoring system each time the URL, the internal implementation of the Service requests are packaged as a complete message tree, the tree may include messages Transaction, Event, Heartbeat, Metricand other information. Complete message tree

Visualization message tree
Distributed message tree [a machine to call another machine]

API function design

  • URL record can be time-consuming piece of code, it can be a time-consuming SQL
  • You can record a record number of code throws an exception, the execution frequency or period of the logic
  • Report regularly perform some of the core indicators, jvm memory, gc and other indicators
  • Monitoring business indicators, such as monitoring the number of orders, transactions, payment success rate
  • Declarative or programmatic monitoring injection
  • Free to appoint a third party data storage engine
  • It supports automatic relegation log level
  • Dynamically specify the monitoring log prefix for classification

Performance Design

Serialization and communication services, including the entire client-side performance which is very critical aspect

  • Asynchronous serialization, jpOwl sequence of the sequence agreement protocol protobuf
  • Asynchronous communication, jpOwl communication is a data transmission based on the NIO achieved Netty
  • Asynchronous operation of IO
  • Asynchronous transmission of
  • Asynchronous data acquisition, logging based Pipeline NIO
  • Based on the level of data buffer memory

Guess you like

Origin juejin.im/post/5d381c19f265da1bcd381a6a