SSDB主从配置
2015-09-01 18:00
267 查看
1、配置:
master:
只需在replication中把binlog打开即可,其它不需要配置replication: binlog: yes # Limit sync speed to *MB/s, -1: no limit sync_speed: -1 slaveof: # to identify a master even if it moved(ip, port changed) # if set to empty or not defined, ip:port will be used. #id: svc_2 # sync|mirror, default is sync #type: sync #ip: 127.0.0.1 #port: 8889
slave:
replication: binlog: yes # Limit sync speed to *MB/s, -1: no limit sync_speed: -1 slaveof: # to identify a master even if it moved(ip, port changed) # if set to empty or not defined, ip:port will be used. id: svc_1 # sync|mirror, default is sync type: sync ip: 192.168.111.19 port: 8886
1) slaveof.id任意配置即可,并且只需要在slave上配置,master上不 需要进行任何配置slaveof.ip和slaveof.port是master的ip和post
2) type必须是sync,mirror是主主配置
2、监控:控制台输入info可进行主从监控
master:
ssdb 127.0.0.1:8886> info … binlogs capacity : 20000000 min_seq : 1 max_seq : 1 replication client 192.168.111.20:55744 type : sync status : SYNC last_seq : 1 …
slave:
ssdb 127.0.0.1:8886> info … binlogs capacity : 20000000 min_seq : 1 max_seq : 1 replication slaveof 192.168.111.19:8886 id : svc_1 type : sync status : SYNC last_seq : 1 copy_count : 0 sync_count : 0 …
每一项的含义详见官方文档:http://ssdb.io/docs/zh_cn/replication.html
注意:
1) master的replication中是client,slave的replication中是slaveof
2) 主从是否同步到位,可比较binlogs.max_seq 和 replication.client.last_seq 是否相等
相关文章推荐
- C#生成Word文档代码示例
- jQuery窗口、文档、网页各种高度的精确理解
- 比较全的一个C#操作word文档示例
- C#编程实现Excel文档中搜索文本内容的方法及思路
- MongoDB修改、删除文档的域属性实例
- 跟老齐学Python之Python文档
- Python文档生成工具pydoc使用介绍
- [网络开发]RakNet文档翻译(3)——Creating Packets
- 二、家庭办公环境的Postfix安装技巧和提示
- AD RMS部署指南
- 文档都不再是刺眼的白底黑字
- sed 的一些文档
- ACL 详解(不错的文档)
- 一篇实用的关于ppt的文档
- SharePoint 2010 新体验3 - 文档集 - Kaneboy的博客 - 51CTO技术博客
- gSOAP中文文档(2)
- 升级服务器 你考虑过这十件事情了么
- 47.怎样让开始 文档里不显示以前打开过的文件:
- 叫你两招编辑PDF文档的方法
- 怎样使用打印到文档功能