当前位置:网站首页>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边栏推荐
猜你喜欢

Error reporting: SQL syntax error in flask. Fields in SQL statements need quotation marks when formatting

PLATO上线LAAS协议Elephant Swap,用户可借此获得溢价收益

Use of resttemplate and Eureka

一文读懂Okaleido Tiger近期动态,挖掘背后价值与潜力

Self-attention neural architecture search for semantic image segmentation

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

云原生应用综合练习下

Summary of process and thread knowledge points 1

18 diagrams, intuitive understanding of neural networks, manifolds and topologies

【HCIP】MPLS 基础
随机推荐
Naver three party login
LeTax记录\documentclass{},authoryear属性使用
ValueError: Colors must be aRGB hex values
一文读懂Okaleido Tiger近期动态,挖掘背后价值与潜力
SQL question brushing: find the employee number EMP with more than 15 salary records_ No and its corresponding recording times t
括号匹配的检验
20220728 sorting strings that are not pure numbers
Understand all the basic grammar of ES6 in one article
FLV文件简介
PLATO上线LAAS协议Elephant Swap,用户可借此获得溢价收益
els 到底停止
How to check the redis Version (check the redis process)
Seven SQL performance optimizations that spark 3.0 must know
一篇万字博文带你入坑爬虫这条不归路 【万字图文】
全新升级:获得淘宝商品详情“高级版” API
Principle and usage setting of large page memory
Openpyxl cell center
地下水、土壤、地质、环境人看过来
Main causes of IT hardware failures and best practices for prevention
Synchronized keyword details