当前位置:网站首页>[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 skywalkingto 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.
边栏推荐
- three.js debugging tool dat.gui use
- 产品太多了,如何实现一次登录多产品互通?
- hcip BGP enhancement experiment
- 2022华数杯数学建模A题环形振荡器的优化设计思路思路代码分享
- Analysis and practice of antjian webshell dynamic encrypted connection
- 数分面试(一)----与业务相关
- 首次去中心化抢劫?近2亿美元损失:跨链桥Nomad 被攻击事件分析
- FPGA: Basic Getting Started LED Lights Blinking
- MySQL transactions
- Which big guy has the 11G GI and ojvm patches in April or January 2020, please help?
猜你喜欢

First Decentralized Heist?Loss of nearly 200 million US dollars: analysis of the attack on the cross-chain bridge Nomad

The JVM collection that Alibaba's top architects have summarized for many years, where can't I check it!

High-quality DeFi application building guide to help developers enjoy DeFi Summer

JS introduction to reverse the recycling business network of learning, simple encryption mobile phone number

5. Deploy the web project to the cloud server

数据中台建设(十):数据安全管理

Voice-based social software development - making the most of its value

还在找网盘资源吗?快点收藏如下几个值得收藏的网盘资源搜索神器吧!

The founder of the DFINITY Foundation talks about the ups and downs of the bear market, and where should DeFi projects go?

【MindSpore易点通机器人-01】你也许见过很多知识问答机器人,但这个有点不一样
随机推荐
【 temperature warning program DE development 】 event driven model instance
STM32+ULN2003 drives 28BYJ4 stepper motor (forward and reverse according to the number of turns)
JS introduction to reverse the recycling business network of learning, simple encryption mobile phone number
Getting started with Polkadot parachain development, this article is enough
Voice-based social software development - making the most of its value
气象数据数据处理实例——matlab字符串切割匹配与R语言日期匹配(数据拼接)
单片机:温度控制DS18B20
【综合类型第 35 篇】程序员的七夕浪漫时刻
DFINITY 基金会创始人谈熊市沉浮,DeFi 项目该何去何从
Jenkins manual (2) - software configuration
FPGA: Basic Getting Started LED Lights Blinking
浅析WSGI协议
5. Deploy the web project to the cloud server
[Strong Net Cup 2022] WP-UM
第五章:redis持久化,包括rdb和aof两种方式[通俗易懂]
FPGA: Basic Getting Started Button Controlling LED Lights
皕杰报表的下拉框联动
第五章:activiti流程分流判断,判断走不同的任务节点
Go compilation principle series 6 (type checking)
High-quality DeFi application building guide to help developers enjoy DeFi Summer