当前位置:网站首页>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
- 增加了
daemonsidecar子命令 #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

边栏推荐
- 指数族分布与最大熵
- Legal education combined with VR panorama, intuitively feel and learn the spirit of the rule of law
- MySQL优化学习笔记
- 代码随想录笔记_动态规划_1049最后一块石头的重量II
- 7 天能找到 Go 工作吗?学学 Go 数组和指针试试
- 【Web技术】1401- 图解 Canvas 入门
- QT笔记——Q_INVOKABLE了解
- Compound Refractive Lenses for X-ray Focusing
- C# 谁改了我的代码
- 【历史上的今天】8 月 4 日:第一位图灵奖女性得主;NVIDIA 收购 MediaQ;首届网络安全挑战大赛完成
猜你喜欢

基本介绍PLSQL

MVCC实现过程

程序猿七夕礼物-如何30分钟给女朋友快速搭建专属语聊房

《分布式云最佳实践》分论坛,8月11日深圳见

洛谷题解P1028 数的计算

Hangzhou Electric School Competition (Counter Attack Index)

2022年7月国产数据库大事记-墨天轮

Online Excel based on Next.js

Bluetooth Technology|In the first half of the year, 1.3 million charging piles were added nationwide, and Bluetooth charging piles will become the mainstream of the market

eNSP-小型网络拓扑(DNS、DHCP、网站服务器、无线路由器)
随机推荐
C# 将dll打包到程序中
1401 - Web technology 】 【 introduction to graphical Canvas
手搓一个“七夕限定”,用3D Engine 5分钟实现烟花绽放效果
C语言写简单三子棋
李沐的深度学习笔记来了!
Leetcode: 215 disorderly to find the first big k element in the array
基于数据库实现分布式锁
技术分享| 小程序实现音视频通话
Google plug-in. Download contents file is automatically deleted after solution
Legal education combined with VR panorama, intuitively feel and learn the spirit of the rule of law
从-99打造Sentinel高可用集群限流中间件
Unity AR阴影投射透明地面 仅渲染模型实时阴影 Shader实现
Nuget 通过 dotnet 命令行发布
24、shell编程-流程控制
Oracle database user creation, restart, import and export
2022杭电多校4
Go 语言快速入门指南: 变量和常量
我爱七夕哈哈哈
leetcode:251. 展开二维向量
Hangzhou electric the competition team arrangement (ACM)