当前位置:网站首页>[Translation] Chaos Net + SkyWalking: Better observability for chaos engineering
[Translation] Chaos Net + SkyWalking: Better observability for chaos engineering
2022-08-05 10:18:00 【programmer_ada】
特邀文章,原载于PingCAP博客,作者:Wang Ningxuan
Chaos Mesh是一个开源的云原生混沌工程平台.你可以使用Chaos Meshto easily inject faults,Simulate abnormal situations that may occur in reality,Thereby discovering potential problems in the system.Chaos MeshA Chaos Dashboard is also provided,Allows you to monitor the status of chaos experiments.然而,This dashboard does not allow you to observe how failures in the experiment affect the service performance of the application.This prevented us from further testing the system and finding potential problems.
Apache SkyWalkingis an open source application performance monitor(APM),专门用于监控、Track and diagnose cloud native、Container-based distributed system.It collects events that happened,and then displayed on its dashboard,Lets you directly observe the type and number of events that occur in the system,and how different events affect service performance.
Use both when you are in Chaos ExperimentSkyWalking和Chaos Mesh时,You can observe how different failures affect service performance.
This tutorial will show you how to configure itSkyWalking和Chaos Mesh.You will also learn how to use both systems to monitor events,And observe in real-time how the chaos experiment affects the service performance of the application.
准备工作
在你开始使用SkyWalking和Chaos Mesh之前,你必须.
- 根据SkyWalking配置指南,建立SkyWalking集群.
- 使用Helm部署Chao Mesh.
- 安装JMeter或其他Java测试工具(to increase the service load).
- If you just want to run a demo,根据本指南配置SkyWalking和Chaos Mesh.
现在,You are completely ready,We can cut to the chase.
第1步:访问SkyWalking集群
安装SkyWalking集群后,You can access its user interface(UI).然而,No services are running at this time,So before starting monitoring,You have to add a service and set up a proxy.
在本教程中,我们以Spring Boot,Take a lightweight microservice framework as an example,Build a simplified presentation environment.
- 参照此文件,在Spring Boot中创建一个SkyWalking演示.
- 执行命令
kubectl apply -f demo-deployment.yaml -n skywalking
to deploy the demo.
完成部署后,你可以在SkyWalkingThe user interface observes real-time monitoring results.
注意:Spring Boot和SkyWalkinghave the same default port number:8080.Be careful when configuring port forwarding,否则,You may have a port conflict.例如,你可以通过使用kubectl port-forward svc/spring-boot-skywalking-demo 8079:8080 -n skywalking
这样的命令将Spring Boot的端口设置为8079,以避免冲突.
第2步:部署SkyWalking KubernetesEvent exporter
SkyWalking KubernetesEvent exporter能够观察、Filter and sendKubernetes事件到SkyWalking后端.然后SkyWalkingCorrelate events with system metrics,And shows an overview of when and how the metric was affected by the event.
If you want to deploy with one line commandSkyWalking Kubernetes Event Explorer,请参考该文件,以YAML格式创建配置文件,Then customize the parameters in the filter and exporter.现在,你可以使用命令kubectl apply
来部署SkyWalking Kubernetes Event Explorer.
第3步:使用JMeterto increase the service load
To better observe changes in service performance,你需要增加Spring Booton the service load.在本教程中,我们使用JMeter,A widely adoptedJava测试工具,to increase the service load.
使用JMeter在localhost:8079
上进行压力测试,and add five threads,Continue to increase the service load.


Apache JMeter的用户界面
打开SkyWalking仪表板.你可以看到,Access rate is100%,The service load reaches approx5300个呼叫(CPM).

SkyWalking仪表板
第四步:Inject faults through the chaos net and observe the results
完成上述三个步骤后,You can use the Chaos Dashboard to simulate stress scenarios,Observe changes in service performance in chaos experiments.

User interface for Chaos Net
The stress under three chaotic conditions is described below,Changes in service performance.
CPU负载.10%;内存负载.128 MB
The first chaotic experiment simulated was lowCPU使用率.To show when the chaos experiment starts and ends,Click the toggle button on the right side of the dashboard.To understand whether the experiment is applied to or recovered from the system,Move the cursor over the green dash.
in the time period between the two short green lines,Service load dropped to 4929CPM,But it returned to normal after the chaotic experiment ended.

Service load changes in the first chaos condition
CPU负载.50%;内存负载.128 MB
当应用程序的CPUload increased to50%时,Service load dropped to 4,307 CPM.

The second chaotic condition的Service load changes
CUP LOAD:100%;内存负载.128 MB
当CPU使用率为100%时,The service load drops to only when there is no chaos experiment40%.

The third chaotic condition的Service load changes
摘要
由于LinuxThe process scheduling under the system does not allow a process to occupy all the timeCPU,所以即使在CPUunder extreme conditions of full load,部署的Spring Boot Demo仍然可以处理40%的访问请求.
通过结合SkyWalking和Chaos Mesh,You can clearly observe when and to what extent a chaos experiment affects application service performance.This combination of tools allows you to observe service performance under various extreme conditions,Thereby enhancing your confidence in the service.
在所有PingCAPThanks to the tireless efforts of engineers and community contributors,Chaos Mesh在2021Year has been greatly developed.In order to continue to upgrade our support for the majority of users,Learn more about user experiences in Chaos Engineering,We would like to invite you to participate 这次调查,Give us your valuable advice.如果你想了解更多关于Chaos Mesh的信息,欢迎你加入GitHub上的Chaos Mesh社区或我们的Slack讨论(#project-chaos-mesh).如果你在使用Chaos Meshfound anybugor lack of functionality,You can ask usGitHub仓库Submit your pull request or issue.
边栏推荐
- 2022华数杯数学建模A题环形振荡器的优化设计思路思路代码分享
- PCB布局必知必会:教你正确地布设运算放大器的电路板
- 华为轻量级神经网络架构GhostNet再升级,GPU上大显身手的G-GhostNet(IJCV22)
- 2022杭电多校 第6场 1008.Shinobu Loves Segment Tree 规律题
- 第四章:activiti流程中,变量的传递和获取流程变量 ,设置和获取多个流程变量,设置和获取局部流程变量「建议收藏」
- 气象数据数据处理实例——matlab字符串切割匹配与R语言日期匹配(数据拼接)
- Oracle temporary table space role
- Can MySQL use aggregate functions without GROUP BY?
- LeetCode 216. Combined Sum III (2022.08.04)
- 数分面试(一)----与业务相关
猜你喜欢
5. Deploy the web project to the cloud server
电竞、便捷、高效、安全,盘点OriginOS功能的关键词
IDEA performs the Test operation, resulting in duplicate data when data is inserted
百年北欧奢华家电品牌ASKO智能三温区酒柜臻献七夕,共品珍馐爱意
linux下oracle常见操作以及日常积累知识点(函数、定时任务)
Create a Dapp, why choose Polkadot?
Custom filters and interceptors implement ThreadLocal thread closure
three物体围绕一周呈球形排列
19. Server-side session technology Session
Jenkins使用手册(2) —— 软件配置
随机推荐
Egg framework usage (2)
教你本地编译运行一个IDEA插件,在IDEA里聊天、下棋、斗地主!
Common operations of oracle under linux and daily accumulation of knowledge points (functions, timed tasks)
MySQL事务
Tanabata romantic date without overtime, RPA robot helps you get the job done
The query that the user's test score is greater than the average score of a single subject
仿SBUS与串口数据固定转换
第四章:redis 数组结构的set和一些通用命令「建议收藏」
Open Source Summer | How OpenHarmony Query Device Type (eTS)
如何选币与确定对应策略研究
2022杭电多校 第6场 1008.Shinobu Loves Segment Tree 规律题
Wei Dongshan Digital Photo Frame Project Learning (6) Transplantation of tslib
登录功能和退出功能(瑞吉外卖)
First Decentralized Heist?Loss of nearly 200 million US dollars: analysis of the attack on the cross-chain bridge Nomad
第五章:多线程通信—wait和notify
数分面试(一)----与业务相关
JS逆向入门学习之回收商网,手机号码简易加密解析
机器学习-基础知识 - Precision, Recall, Sensitivity, Specificity, Accuracy, FNR, FPR, TPR, TNR, F1 Score, Bal
Jenkins使用手册(2) —— 软件配置
第四章:activiti流程中,变量的传递和获取流程变量 ,设置和获取多个流程变量,设置和获取局部流程变量「建议收藏」