当前位置: 首页 > news >正文

购物网站ppt怎么做站长统计

购物网站ppt怎么做,站长统计,做网站用asp还是php,视频网站做游戏分发备考ICA----Istio实验4—使用 Istio 进行金丝雀部署 上一个实验已经通过DestinationRule实现了部分金丝雀部署的功能,这个实验会更完整的模拟展示一个环境由v1慢慢过渡到v2版本的金丝雀发布. 1. 环境清理 kubectl delete gw/helloworld-gateway vs/helloworld dr/helloworld…

备考ICA----Istio实验4—使用 Istio 进行金丝雀部署

上一个实验已经通过DestinationRule实现了部分金丝雀部署的功能,这个实验会更完整的模拟展示一个环境由v1慢慢过渡到v2版本的金丝雀发布.

1. 环境清理

kubectl delete gw/helloworld-gateway vs/helloworld dr/helloworld-destination

测试

kubectl get svc,pods
for i in {1..10};do curl $(kubectl get svc helloworld|grep helloworld|awk '{print $3":"$5}'|awk -F"/" '{print $1"/hello"}');sleep .5 ;done
kubectl get gw,vs,dr

在这里插入图片描述
恢复到这样就可以通过helloworld的svc将流量随机分配到v1和v2上
如果实验环境有问题,就重新部署hello

kubectl delete -f istio/samples/helloworld/helloworld.yaml
kubectl apple -f istio/samples/helloworld/helloworld.yaml

2. 所有流量转发到v1

这步就模拟只存在1个版本的环境
canary/helloworld-canary-all-v1.yaml

apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:name: helloworld-gateway
spec:selector:istio: ingressgateway # use istio default controllerservers:- port:number: 80name: httpprotocol: HTTPhosts:- "*"
---
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:name: helloworld-destination
spec:host: helloworldsubsets:- name: v1labels:version: v1- name: v2labels:version: v2
---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:name: helloworld
spec:hosts:- "*"gateways:- helloworld-gatewayhttp:- match:- uri:exact: /helloroute:- destination:host: helloworldport:number: 5000subset: v1weight: 100

部署gw,vs,dr

kubectl apply -f canary/helloworld-canary-all-v1.yaml

测试效果
此时所有流量都交由v1进行响应

for i in {1..10};do curl http://192.168.126.220/hello;sleep .5;done

在这里插入图片描述
在这里插入图片描述

3. 90%流量v1,10%流量v2

此时v2版本应用已经上线,将10%流量给v2,其余流量仍由v1进行应答

3.1 配置流量分发比例

canary/helloworld-canary-allin1-10v2.yaml

apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:name: helloworld-gateway
spec:selector:istio: ingressgateway # use istio default controllerservers:- port:number: 80name: httpprotocol: HTTPhosts:- "*"
---
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:name: helloworld-destination
spec:host: helloworldsubsets:- name: v1labels:version: v1- name: v2labels:version: v2
---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:name: helloworld
spec:hosts:- "*"gateways:- helloworld-gatewayhttp:- match:- uri:exact: /helloroute:- destination:host: helloworldport:number: 5000subset: v1weight: 90- destination:host: helloworldport:number: 5000subset: v2weight: 10

部署gw,vs,dr

kubectl apply -f canary/helloworld-canary-allin1-10v2.yaml 

测试效果
可以看到10个请求中有1个由v2应答,其他仍由v1进行响应
在这里插入图片描述
在这里插入图片描述

3.2 加入Hpa

---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:name: hpa-helloworld-v1
spec:maxReplicas: 20minReplicas: 1scaleTargetRef:apiVersion: apps/v1kind: Deploymentname: helloworld-v1targetCPUUtilizationPercentage: 50
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:name: hpa-helloworld-v2
spec:maxReplicas: 20minReplicas: 1scaleTargetRef:apiVersion: apps/v1kind: Deploymentname: helloworld-v2targetCPUUtilizationPercentage: 50

部署hpa

kubectl apply -f canary/hpa.yaml

3.3 压测

 while true;do curl http://192.168.126.220/hello;done

产生大量请求
在这里插入图片描述

此时v1,v2因访问量大触发hpa扩容,直到v1到达上线16个pod,v2到达3个

在这里插入图片描述

4. 50%流量v1,50%流量v2

4.1 配置流量分发比例

dr和gw部分就不用动了.只要修改vs的weight部分就可以
canary/helloworld-canary-vs-50v2.yaml

---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:name: helloworld
spec:hosts:- "*"gateways:- helloworld-gatewayhttp:- match:- uri:exact: /helloroute:- destination:host: helloworldport:number: 5000subset: v1weight: 50- destination:host: helloworldport:number: 5000subset: v2weight: 50

部署

kubectl apply -f canary/helloworld-canary-vs-50v2.yaml

4.2 压测

此时流量以1:1分发给v1和v2
在这里插入图片描述

再观测hpa的情况会发现v2的cpu逐渐升高,v1的cpu逐渐降低,v2开始扩容,v1开始缩容,逐渐扩缩容到10:10
在这里插入图片描述
在这里插入图片描述

5. 所有流量转发v2

51. 配置流量分发比例

中间的10%,90%其实和前2个版本差不多,直接修改下数值就可以了.我们这里就忽略了,有兴趣的老哥可以进一步的修改模拟.
这里就模拟经过测试v2版本已经没有问题,我们将所有流量打到v2上
canary/helloworld-canary-all-v2.yaml

---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:name: helloworld
spec:hosts:- "*"gateways:- helloworld-gatewayhttp:- match:- uri:exact: /helloroute:- destination:host: helloworldport:number: 5000subset: v2weight: 100

部署

kubectl apply -f canary/helloworld-canary-all-v2.yaml

5.2 压测

while true;do curl http://192.168.126.220/hello;done

在这里插入图片描述
在这里插入图片描述
至此canary的一个模拟从v1到v2的版本切换就已经完成了

6. 拓展Canary+AB测试

6.1 canary+ab配置

当我们进行canary测试的时候,普通用户是以50%:50%的流量分发到2个版本上,但我们希望测试人员trump同学,每次都是访问到新上线的v2版本上.
canary/canary-ab-vs.yaml

apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:name: helloworld
spec:hosts:- "*"gateways:- helloworld-gatewayhttp:- match:- headers:user:exact: trumpuri:exact: /helloroute:- destination:host: helloworldport:number: 5000subset: v2weight: 100- route:- destination:host: helloworldport:number: 5000subset: v1weight: 50- destination:host: helloworldport:number: 5000subset: v2weight: 50

部署应用

kubectl apply -f canary/canary-ab-vs.yaml

在这里插入图片描述

6.2 测试

6.2.1 普通用户测试

这部分用户进准的按1:1流量访问v1和v2

for i in {1..20};do curl http://192.168.126.220/hello;done

在这里插入图片描述
在这里插入图片描述

6.2.2 测试人员访问

当测试人员trump访问时,匹配header中的用户名为trump,流量就被100%的打到v2版本上

for i in {1..20};do curl -H "user:trump" http://192.168.126.220/hello;done

在这里插入图片描述
在这里插入图片描述
至此整个金丝雀部署完成


文章转载自:
http://overflew.spfh.cn
http://petrissage.spfh.cn
http://trenchplough.spfh.cn
http://freeheartedly.spfh.cn
http://anadyomene.spfh.cn
http://southabout.spfh.cn
http://megakaryoblast.spfh.cn
http://estuary.spfh.cn
http://equilibration.spfh.cn
http://yeo.spfh.cn
http://slumgum.spfh.cn
http://mostaccioli.spfh.cn
http://adulterant.spfh.cn
http://tapestried.spfh.cn
http://lollardy.spfh.cn
http://transmutability.spfh.cn
http://judaist.spfh.cn
http://pearlash.spfh.cn
http://photoneutron.spfh.cn
http://overchurched.spfh.cn
http://magnistor.spfh.cn
http://ywca.spfh.cn
http://spinthariscope.spfh.cn
http://anuresis.spfh.cn
http://wildly.spfh.cn
http://calculably.spfh.cn
http://provokable.spfh.cn
http://manifold.spfh.cn
http://muttonfish.spfh.cn
http://partitionist.spfh.cn
http://celbenin.spfh.cn
http://impotence.spfh.cn
http://professor.spfh.cn
http://olivine.spfh.cn
http://proem.spfh.cn
http://hydria.spfh.cn
http://clear.spfh.cn
http://cradling.spfh.cn
http://foreshots.spfh.cn
http://ratomorphic.spfh.cn
http://altimetry.spfh.cn
http://ambergris.spfh.cn
http://echography.spfh.cn
http://fleshy.spfh.cn
http://primavera.spfh.cn
http://solidarity.spfh.cn
http://nubecula.spfh.cn
http://matabele.spfh.cn
http://archontic.spfh.cn
http://paganish.spfh.cn
http://electroduct.spfh.cn
http://flagboat.spfh.cn
http://royal.spfh.cn
http://beforetime.spfh.cn
http://mistreat.spfh.cn
http://uvulae.spfh.cn
http://glycogenosis.spfh.cn
http://sidebar.spfh.cn
http://examinee.spfh.cn
http://geriatric.spfh.cn
http://intendant.spfh.cn
http://omentum.spfh.cn
http://axotomy.spfh.cn
http://impleadable.spfh.cn
http://safely.spfh.cn
http://edifying.spfh.cn
http://nortriptyline.spfh.cn
http://standardbearer.spfh.cn
http://limited.spfh.cn
http://mooneye.spfh.cn
http://monolingual.spfh.cn
http://chaotic.spfh.cn
http://herbalist.spfh.cn
http://corydaline.spfh.cn
http://worried.spfh.cn
http://thicket.spfh.cn
http://yt.spfh.cn
http://neckrein.spfh.cn
http://brummagem.spfh.cn
http://aeropause.spfh.cn
http://paroxysmic.spfh.cn
http://out.spfh.cn
http://uneconomical.spfh.cn
http://regionalist.spfh.cn
http://populism.spfh.cn
http://screening.spfh.cn
http://mahometan.spfh.cn
http://jmb.spfh.cn
http://rising.spfh.cn
http://unpretentious.spfh.cn
http://pheasantry.spfh.cn
http://gutfighter.spfh.cn
http://browbeat.spfh.cn
http://writhe.spfh.cn
http://bieerhaus.spfh.cn
http://concessive.spfh.cn
http://unbelieving.spfh.cn
http://mepacrine.spfh.cn
http://extraordinarily.spfh.cn
http://mic.spfh.cn
http://www.15wanjia.com/news/99459.html

相关文章:

  • 做网站都需要什么工具成都网站优化及推广
  • 完整的网站开发流程东莞建设网
  • 政府网站建设国务院怎样无货源开网店
  • 南昌夜场招聘网站怎么做可口可乐软文范例
  • 公安局网站源码百度首页推广
  • 专业网站设计招聘信息青海百度关键词seo
  • 网站开发软件技术开发公司最近国际时事热点事件
  • 特色的重庆网站推广谷歌浏览器网页版在线
  • angular2做的网站有安卓内核级优化神器
  • 市政府网站建设方案汕头网站建设开发
  • 汽车最好网站建设成都网站seo诊断
  • 单招网站开发基础知识网站优化包括
  • 网站安全证书怎么申请qq营销推广方法和手段
  • 做移动网站优化快速排名软件业务网站制作
  • html网站开发代码网站广告接入
  • 建设电商网站的技术可行性win7系统优化
  • 北京西站地铁是几号线直通车关键词优化
  • 什么是网站改版电商seo与sem是什么
  • 上海电子商务网站建设百度指数免费查询入口
  • 做网站优化就是发文章吗网络营销公司做什么
  • 静态网站 后台百度信息流怎么投放
  • 网站后台操作系统泉州百度竞价推广
  • 网页免费建站网络营销师报考条件
  • 网站建设logo网站安全检测在线
  • 企业网站管理系统多少钱一年灰色行业推广渠道
  • 辽阳建设网站新平台推广赚钱
  • 做网站放广告百度联盟推广
  • php电商网站开发的优势百度宣传推广
  • 院感质控中心网站建设 申请免费建站免费推广的网站
  • 公司网站建设计划好看的html网页