当前位置:网站首页>Pisanix v0.2.0 发布|新增动态读写分离支持
Pisanix v0.2.0 发布|新增动态读写分离支持
2022-08-04 15:10:00 【InfoQ】
1.动态读写分离介绍
1.1 介绍
- 节点: 指后端数据库节点。
- RulesMatch:RulesMatch 引擎通过编写的规则集,与 Pisa-Proxy 接收到的 SQL 查询语句做匹配。
- TargetRole: 指通过规则匹配引擎匹配到的 TargetRole 组,每个 TargetRole 组里可能会有一个或多个节点。
- LoadBalance:负载均衡模块会按照相应的算法从 TargetRole 组里选取一个合适的节点。
- TargetInstance:指由 LoadBalance 模块选出的节点。
- Discovery:发现类型,对应于后端数据源使用的高可用策略,例如: MHA,RDS,MGR等等,本版本中主要支持了 MHA。
- Monitor: 指 Pisa-Proxy 对后端的探测模块,在 MHA 中主要依赖于4种 Monitor:
- Connect Monitor: 探测数据库连通性。
- Ping Monitor: 探测数据库是否健康。
- Replication Lag Monitor: 探测主从复制延迟状态。
- Read Only Monitor: 探测主从数据库角色

1.2 读写分离配置

apiVersion: core.database-mesh.io/v1alpha1
kind: TrafficStrategy
metadata:
name: catalogue
namespace: demotest
spec:
selector:
matchLabels:
source: test
loadBalance:
readWriteSplitting:
dynamic:
defaultTarget: readwrite
discovery:
masterHighAvailability:
connectionProbe:
failureThreshold: 3
periodMilliseconds: 1000
timeoutMilliseconds: 6000
monitorPeriod: 1000
pingProbe:
failureThreshold: 3
periodMilliseconds: 1000
timeoutMilliseconds: 6000
readOnlyProbe:
failureThreshold: 3
periodMilliseconds: 1000
timeoutMilliseconds: 6000
replicationLagProbe:
failureThreshold: 3
maxReplicationLag: 3
periodMilliseconds: 1000
timeoutMilliseconds: 6000
user: monitor
password: monitor
rules:
- algorithmName: roundrobin
name: write-rule
regex:
- ^insert
target: readwrite
type: regex
- algorithmName: roundrobin
name: read-rule
regex:
- ^select
target: read
type: regex
2. Pisanix v0.2.0 版本说明
- Pisa-Controller
- 在 TrafficStrategy CRD ReadWriteSplitting 字段中,增加了对动态读写分离的支持 #208
- Pisa-Proxy
- 支持动态感知读写分离 #204
- 增加了
daemon
sidecar
子命令 #190
- 重构了 Pisa-Proxy 配置文件 #182
- 完善 SHOW SQL 语句解析 #183
- 增加 Pisa-Controller 代码覆盖率检查 #192
- 增加对后端数据源连接失败重连 #215
- Pisa-Controller
- 修复 webhook tls #221
- Pisa-Proxy
- 修复 MySQL8 认证切换请求失败问题 #170
- MySQL 协议 EOF 包处理异常 #166
- 修复了 Charset 字符集 #154
- 修复注入环境变量 #223
- Docs
- 新增读写分离说明文档:https://www.pisanix.io/docs/v0.2.0/Features/readwritesplitting/
- 更新单机部署文档:https://www.pisanix.io/docs/v0.2.0/UseCases/standalone
- Charts
- 更新至 v0.2.0
3. 社区
- mlycore
- xuanyuan300
- wbtlb
- windghoul
- lltgo
- tuichenchuxin
- dongzl

边栏推荐
猜你喜欢
用了TCP协议,就一定不会丢包吗?
IP第十八天笔记
Leetcode: 215 disorderly to find the first big k element in the array
leetcode: 253. How many meeting rooms are required at least
Redis 高可用
基于数据库实现分布式锁
16、学习MySQL 正则表达式
[Beiya data recovery] IBM System Storage storage lvm information lost data recovery solution
Legal education combined with VR panorama, intuitively feel and learn the spirit of the rule of law
Technology sharing | Mini program realizes audio and video calls
随机推荐
【历史上的今天】8 月 4 日:第一位图灵奖女性得主;NVIDIA 收购 MediaQ;首届网络安全挑战大赛完成
leetcode:255 验证前序遍历序列二叉搜索树
HarePoint Analytics for SharePoint Online
tif转mat
Nuget 通过 dotnet 命令行发布
Semaphore 基本原理
1401 - Web technology 】 【 introduction to graphical Canvas
C# 谁改了我的代码
卖家寄卖流程梳理
Hangzhou Electric School Competition (Counter Attack Index)
Next -21- 添加相册系列 - 1- 框架设置
Android Sqlite3 basic commands
微软表示将向内部网络安全专家共享数据 为企业提供更安全保护
指数族分布与最大熵
Zheng Qing freshmen school competition and middle-aged engineering selection competition
leetcode: 255 Verify preorder traversal sequence binary search tree
Latex 去掉行号
AOSP内置APP特许权限白名单
Roslyn 节点的 Span 和 FullSpan 有什么区别
7 天找个 Go 工作,Gopher 要学的条件语句,循环语句 ,第3篇