当前位置:网站首页>[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.
边栏推荐
- Qiu Jun, CEO of Eggplant Technology: Focus on users and make products that users really need
- 第六章:activiti流程分流判断之排它网关和并行网关
- MySQL之数据视图
- 【AGC】增长服务1-远程配置示例
- 深入理解 Istio 流量管理的超时时间设置
- Which big guy has the 11G GI and ojvm patches in April or January 2020, please help?
- Oracle临时表空间作用
- High-quality DeFi application building guide to help developers enjoy DeFi Summer
- 气象数据数据处理实例——matlab字符串切割匹配与R语言日期匹配(数据拼接)
- 创建一个 Dapp,为什么要选择波卡?
猜你喜欢
High-quality DeFi application building guide to help developers enjoy DeFi Summer
The founder of the DFINITY Foundation talks about the ups and downs of the bear market, and where should DeFi projects go?
Our Web3 Entrepreneurship Project, Yellow
2022 Huashu Cup Mathematical Modeling Question A Optimization Design Ideas for Ring Oscillators Code Sharing
After Keil upgrades to AC6, what changes?
Pycharm 常用外部工具
Analysis and practice of antjian webshell dynamic encrypted connection
告白数字化转型时代:麦聪软件以最简单的方式让企业把数据用起来
我们的Web3创业项目,黄了
高质量 DeFi 应用构建指南,助力开发者玩转 DeFi Summer
随机推荐
ffmpeg drawtext add text watermark
[Android]如何使用RecycleView in Kotlin project
一个栈的输入序列为1 2 3 4 5 的出站顺序的理解
NowCoderTOP35-40 - continuous update ing
静态链接和动态链接
[Unity] [UGUI] [Display text on the screen]
Offensive World-PWN-new_easypwn
mysql索引
产品太多了,如何实现一次登录多产品互通?
使用工具类把对象中的null值转换为空字符串(集合也可以使用)
Ali's new launch: Microservices Assault Manual, all operations are written out in PDF
The query that the user's test score is greater than the average score of a single subject
Create a Dapp, why choose Polkadot?
仿SBUS与串口数据固定转换
GCC编译的时候头文件搜索规则
three物体围绕一周呈球形排列
Wei Dongshan Digital Photo Frame Project Learning (6) Transplantation of tslib
[Strong Net Cup 2022] WP-UM
Four years of weight loss record
Confessing in the era of digital transformation: Mai Cong Software allows enterprises to use data in the easiest way