当前位置:网站首页>Web service performance monitoring scheme
Web service performance monitoring scheme
2022-07-07 03:58:00 【The season when the monsoon dies】
One 、 Use of local testing tools
advantage :
- Trigger multiple requests at once , And each parameter can change dynamically , It is helpful to make up for the insufficient coverage of single unit test scenarios of interfaces
- It can complete the qualitative test of interface performance , Make preliminary selection for interface performance test .
- Developers share a development environment database , It is convenient for you to have an intuitive and comprehensive understanding of all microservice interface tests
defects :
- Local machines vary in performance , And the number of concurrent threads cannot be controlled . As a result, the response time results of interface test fluctuate greatly , The result data of quantitative analysis on the degree of interface performance is not reliable .
- It is impossible to make sequential link calls to test the overall performance of a module's interface .
- When an interface parameter depends on the result of the previous interface , To ensure a desired interface hit rate through regular expressions , More troublesome .
- It is impossible to measure the actual operation of the interface after it passes through the gateway .
Conclusion :
Local testing tools are only applicable to developing interfaces at interfaces , Complete the interface unit test and preliminary performance test locally , Want to complete the quantitative analysis of interface performance and the full link analysis of interface calls , We have to rely on other tools .
Two 、 Development environment interface performance testing and monitoring
Due to the instability of the local environment and the short board of the local interface test tool , So we need a stable environment to deploy other tools to make up , This environment is preferably a development environment .
Request sending and monitoring tools jmeter

The request sending tool of the development environment uses jmeter, It can make up for the shortage of local testing tools , Such as :
- It can generate a continuous and stable number of concurrent messages sent to an interface , Measured interface TPS Value in steady state .
- It can realize the sequential link call of the interface , Test the whole module TPS value .
- You can get the request parameters according to the file , Improve the hit rate of the interface .
Request link analysis tool skywalking
In the course of the request , If an interface is found TQS Couldn't get on , You can use skywalking It takes time to analyze each link .


Prometheus+Grafana Monitor performance metrics
Jmeter monitor
You can see it clearly Jmeter The total number of requests 、 Number of failures 、TPS Change trend and other information during interface debugging

web Application monitoring
Main monitoring jvm Usage and garbage collection 
Mysql monitor
monitor mysql Connection number 、QPS、 Slow query, etc

Redis monitor
Main monitoring redis Memory 、 The Internet IO、 Of each database key Value usage .
web Apply performance analysis tools Arthas
Prometheus+Grafana It can be done to web Monitoring to jvm Usage and GC situation , But to analyze the specific reasons, we have to rely on Arthas.
As per cpu Usage analysis thread state


3、 ... and 、 Summary of interface test steps
Local testing :
Complete the unit test through the local interface test tool , And the preliminary selection of performance test , If the interface test results cannot meet the query 300 Time /s, Additions and deletions 100 Time /s, Then debug the development environment .
Development environment debugging :
- Deploy in the development environment jmeter、skywalking、Prometheus、Grafana And other monitoring tools and configure relevant monitoring parameters .
- Use jmeter Make concurrent requests for interfaces that need to be debugged in the development environment , Observe each middleware and web Service cpu usage , Find out the performance bottleneck of the link .
边栏推荐
- Baidu map JS development, open a blank, bmapgl is not defined, err_ FILE_ NOT_ FOUND
- 10 ways of interface data security assurance
- Implementation of map and set
- Redis源码学习(31),字典学习,dict.c(一)
- cuda编程
- 使用 BR 备份 TiDB 集群到 GCS
- QT 打开文件 使用 QFileDialog 获取文件名称、内容等
- Ubuntu20 installation redisjson record
- VHDL implementation of arbitrary size matrix addition operation
- Confirm the future development route! Digital economy, digital transformation, data This meeting is very important
猜你喜欢

Free PHP online decryption tool source code v1.2

PHP lightweight Movie Video Search Player source code

leetcode:面试题 17.24. 子矩阵最大累加和(待研究)

Code quality management

Mobile measurement and depth link platform - Branch
![[leetcode] 700 and 701 (search and insert of binary search tree)](/img/b0/6aa9185f02fb1905fc59e6b329f7c3.jpg)
[leetcode] 700 and 701 (search and insert of binary search tree)

U.S. Air Force Research Laboratory, "exploring the vulnerability and robustness of deep learning systems", the latest 85 page technical report in 2022
![[dpdk] dpdk sample source code analysis III: dpdk-l3fwd_ 001](/img/f6/dced69ea36fc95ef84bb546c56dd91.png)
[dpdk] dpdk sample source code analysis III: dpdk-l3fwd_ 001

机器学习笔记 - 使用机器学习进行鸟类物种分类
![[security attack and Defense] how much do you know about serialization and deserialization?](/img/1c/e5ae74e65bacf688d7f61cc1b71d3e.png)
[security attack and Defense] how much do you know about serialization and deserialization?
随机推荐
[leetcode] 450 and 98 (deletion and verification of binary search tree)
About Confidence Intervals
map和set的实现
VHDL implementation of arbitrary size matrix multiplication
Leetcode: interview question 17.24 Maximum cumulative sum of submatrix (to be studied)
Native MySQL
Redis源码学习(31),字典学习,dict.c(一)
QT opens a file and uses QFileDialog to obtain the file name, content, etc
使用切面实现记录操作日志
太方便了,钉钉上就可完成代码发布审批啦!
Can the applet run in its own app and realize live broadcast and connection?
Ggplot facet detail adjustment summary
大白话高并发(二)
Machine learning notes - bird species classification using machine learning
Termux set up the computer to connect to the mobile phone. (knock the command quickly), mobile phone termux port 8022
How to detect whether the MySQL code runs deadlock +binlog view
Search of linear table
Redis configuration and optimization of NoSQL
【安全攻防】序列化与反序列,你了解多少?
你心目中的数据分析 Top 1 选 Pandas 还是选 SQL?