当前位置:网站首页>Cloud native application comprehensive exercise
Cloud native application comprehensive exercise
2022-07-29 01:30:00 【taoli-qiao】
In the last blog, I talked about the front 4 Three scenes were practiced , This blog will focus on the following 5 Practice in scenes . The specific scenario information is as follows , The application still uses istio Official website bookinfo application .

6、 ... and : Through the open Kiali, utilize Promethues Collect service invocation relationship information
6.1: install Promethues, Only here Istio Official website Under the yaml File to install ,yaml The file directory is (samples/addons/promethues.yaml)
6.2: Turn on Kiali plug-in unit , So that you can get through Kiali The plug-in collects the call relationship information between services .Kiali Of yaml The file in Istio Official website Of Sample Under the table of contents (samples/addons/kiali.yaml).
6.3: take Kiali Of svc Modified into NodePort type , In this way, you can access on the Internet kiali service .

6.4: visit Kiali, Can be in Graph menu Next , notice bookinfo The calling relationship between micro Services .

7、 ... and : To achieve gray Publishing
7.1: see bookInfo application , You can find review The service has 3 A version .

7.2 adopt destination Different definitions subset,yaml The file address is istio This directory of the official website
(samples/bookinfo/networking/destination-rule-all.yaml)
Then define VirtualService To control the flow , There are two yaml file , these two items. yaml The file is also in the above directory .
virtual-service-all-v1.yaml: Import all traffic V1 Version of reviews service ,V1 Version of reviews The icon of stars cannot be displayed .
virtual-service-reviews-test-v2.yaml: If the logged in user is JASON, Then import the flow to V2 On the version , and review Of V2 The version can display stars . It's a bit like , for example V2 Is the new version , For early adopters , You can put V2 The new features of the version allow early adopters to use , Collect feedback .v2 Of virtualservice The rules are as follows :

7.3: After the rules take effect , visit productpage, You can see if you use jason Sign in , Then the stars are displayed , Explain the visit is V2.


8、 ... and : fault injection , By injecting some faults, we can check whether there are technical hidden debts in the application .
Istio Support through configuration VertualService To inject some faults such as delay , To check whether the service has reasonable fault tolerance . Actually, there are special tools for fault injection , for example chaosmesh,chaoslade, In the follow-up blog, we will introduce the use of various fault injection tools in the chaos engineering column , So here is only a brief introduction .
8.1: For example, here the injection returns 555 code Of 100% Street level fault error .

8.2: For example, inject 100% Delay of 7s Fault error of .

Nine : stay VirtualService Configure timeout in 、 Circuit breakers, etc
9.1: visit reviews This service , If the response time exceeds 0.5s, The timeout error is returned

9.2: Small example of circuit breaker rule configuration
kubectl apply -f - <<EOF
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: ratings
spec:
host: ratings
subsets:
- labels:
version: v1
name: v1
- labels:
version: v2
name: v2
- labels:
version: v2-mysql
name: v2-mysql
- labels:
version: v2-mysql-vm
name: v2-mysql-vm
trafficPolicy:
connectionPool:
tcp:
maxConnections: 1
http:
http1MaxPendingRequests: 1
maxRequestsPerConnection: 1
outlierDetection:
consecutive5xxErrors: 1
interval: 1s
baseEjectionTime: 3m
maxEjectionPercent: 100
EOF边栏推荐
- C语言300行代码实现扫雷(可展开+可标记+可更改困难级别)
- log4j动态加载配置文件
- 教你一文解决 js 数字精度丢失问题
- CSDN modify column name
- ValueError: Colors must be aRGB hex values
- Digital twin rail transit: "intelligent" monitoring to clear the pain points of urban operation
- 正则校验与时间格式化
- Transfer: cognitive subculture
- SQL question brushing: find the last of all employees who have been assigned departments_ Name and first_ Name and Dept_ no
- 了解各种路径
猜你喜欢

C language 300 lines of code to achieve mine sweeping (deployable + markable + changeable difficulty level)

redis安装,集群部署与常见调优

Self-attention neural architecture search for semantic image segmentation

Openpyxl merge cells

nep 2022 cat

Canal real-time parsing MySQL binlog data practice

Flink Postgres CDC

地下水、土壤、地质、环境人看过来

测试/开发程序员靠技术渡过中年危机?提升自己本身的价值......
![[idea] where to use the query field](/img/63/f95868907364fc949885c67c34ba32.png)
[idea] where to use the query field
随机推荐
(perfect solution) why is the effect of using train mode on the train/val/test dataset good, but it is all very poor in Eval mode
uniapp createSelectorQuery().select 获取返回null报错
mysql 创建索引的三种方式
App access kakaotalk three party login
梅克尔工作室——HarmonyOS实现列表待办
Redis installation, cluster deployment and common tuning
Flink Postgres CDC
什么是原码、反码和补码
Bracket matching test
Intel introduces you to visual recognition -- openvino
Openpyxl cell center
Flink SQL Hudi 实战
面试官:程序员,请你告诉我是谁把公司面试题泄露给你的?
Oozie工作调度
Flask reports an error: pymysq1.err OperationalError:(1054, “Unknown column ‘None‘ in ‘field list‘“)
Docuware mobile labor solution can help you build a new productivity model: anytime, anywhere, any device
云原生应用综合练习下
APP接入Kakaotalk三方登录
Third party login process of flask Weibo
写作作业一