目录
一、 pxc介绍 ........................................................................................................................................4
1.1. 什么是pxc ...............................................................................................................................4
1.1 pxc同步原理 ..........................................................................................................................4
1.2. pxc的特点 ...............................................................................................................................5
1.3. pxc与replication的区别 .................................................................................................6
二、 pxc 部署实践 ..............................................................................................................................6
2.1 运行环境 ...................................................................................................................................6
2.2 pxc常用端口 ...........................................................................................................................7
2.3 系统环境准备 ..........................................................................................................................7
2.4 集群软件安装 ....................................................................................................................... 10
2.5 初始化集群 ........................................................................................................................... 11
三、 pxc 状态监控指标................................................................................................................... 23
3.1 状态指标查询 ....................................................................................................................... 23
3.2 队列信息 ................................................................................................................................ 24
3.3 流量控制信息 ....................................................................................................................... 25
3.4 节点与集群的状态信息 ..................................................................................................... 26
3.5 事务的相关信息 .................................................................................................................. 27
四、 pxc日常操作 ............................................................................................................................ 27
4.1 pxc节点的关闭 .................................................................................................................... 27
4.2 意外下线节点 ....................................................................................................................... 28
五、 配置mycat负载均衡 .............................................................................................................. 28
5.1 安装mycat ............................................................................................................................ 28
5.2 配置mycat ........................................................................................................................... 29
5.3 测试mycat ........................................................................................................................... 32
5.4 mycat数据切分 .................................................................................................................. 34
5.4.1 主键求模切分 .......................................................................................................... 34
5.4.2 主键范围切分 .......................................................................................................... 34
5.4.3 日期切分................................................................................................................... 34
5.4.4 枚举值切分 .............................................................................................................. 34
5.5 mycat父子表 ....................................................................................................................... 37
5.6 mycat集群方案 .................................................................................................................. 38
5.7 haproxy安装........................................................................................................................ 40
5.8 keepalived实现haproxy的高可用................................................................................ 43
5.9 sysbench基准测试 ............................................................................................................. 45
5.10 tpcc-mysql压力测试 ......................................................................................................... 52
5.10.1 准备工作................................................................................................................... 52
5.10.2 tpcc-mysql 安装 .................................................................................................... 53
5.10.3 创建测试库 .............................................................................................................. 53
5.10.4 执行测试................................................................................................................... 54
5.10.5 查看测试结果 .......................................................................................................... 54
六、 mysql的5种特殊架构设计................................................................................................ 56
6.1 mysql 分布式proxy 扩展 .............................................................................................. 57
文档被以下合辑收录
评论