灰度发布的实现要满足以下两点:流量配置(工作人员配置不同策略,配置放量)用户标识(以用户为维度,多次请求都打到同一台服务器)按照端划分,分为:web端、客户端、服务端web端前端资源分配版本号,根据策略放量到指定版本。把用户id和版本号的映射关系保存到cookie。客户端一般根据以下几种策略:用户设备的系统和应用版本;渠道;设备ID和用户ID;服务端分为兼容变更和不兼容变更。兼容变更:物理灰度:按机器维度划分,使用kong等网关逻辑灰度:使用代码控制,精确控制,但是侵入性较强不兼容变更:版本号:新老版本并存,前后端都需要改变,使用 /v1/api 和 /v2/api 区分流量策略,一般有以下几种:按流量百分比比如10%打到目标服务器,剩余打到默认服务器按人群打标划分按用户id、ip、设备类型等按地域、性别、年龄等按渠道比如用户的注册源
常用查询命令汇总:集群健康度:curl http://127.0.0.1:9200/_cat/health?v -u elastic:elastic节点情况:curl http://127.0.0.1:9200/_cat/nodes?v -u elastic:elastic红色索引:curl http://127.0.0.1:9200/_cat/indices?v -u elastic:elastic | grep -w "red"磁盘占用情况:curl http://127.0.0.1:9200/_cat/allocation?v -u elastic:elastic如果有分片是unassigned,可以执行以下指令:curl -u elastic:elastic http://127.0.0.1:9200/_cluster/allocation/explaincurl -u elastic:elastic http://127.0.0.1:9200/_cluster/reroutecurl -H "Content-Type: application/json" -XPOST 'h
curl命令查看响应时间curl -w "%{time_namelookup}::%{time_connect}::%{time_starttransfer}::%{time_total}::%{speed_download}" "\n" 参数含义 time_namelookupDNS解析域名时间 time_connectTCP连接的时间,三次握手的时间 time_starttransfer从请求开始到第一个字节将要传输的时间 time_total总时间 speed_download下载速度,单位-字节每秒 time_appconnectSSL|SSH等上层连接建立的时间 time_pretransfer从请求开始到响应开始传输的时间 time_redirect从开始到最后一个请求事务的时间 例如:curl -w "%{time_namelookup}--%{time_connect}--%{time_starttransfer}--%{time_total}" "http://localhost:19092/seller"curl -o "%{time_
nginx中配置proxy_pass一般是形如这样:location /proxy {proxy_pass http://xxxx.com/;}这里面有几种情况,比如location后面是否带 / ,或者proxy_pass后面是否带 / ,下面分情况试验下:第一种:location /proxy {proxy_pass http://xxxx.com;}跳转到:http://xxxx.com/index.html;第二种:location /proxy {proxy_pass http://xxxx.com/;}跳转到:http://xxxx.com/index.html;第三种:location /proxy/ {proxy_pass http://xxxx.com;}跳转到:http://xxxx.com/proxy/index.html;第四种:location /proxy/ {proxy_pass http://xxxx.com/;}跳转到:http://xxxx.com/index.html;第五种:location /proxy/ {proxy_pass http://
scp -P 22622 elasticsearch-6.8.2.tar.gz root@192.168.110.121:/opt在两台服务器之间进行scp的时候,突然报错了。。现象:which scp有显示:/usr/bin/scp但是scp指令输入密码后报错:root@192.168.110.121's password:bash: scp: command not foundlost connection最后找到了问题:两台服务器都需要安装yum install openssh-clients客户端和 server端都需要安装这个包
康叔的AI全栈工坊
Code for Life, AI for Future