flike / kingbus Goto Github PK
View Code? Open in Web Editor NEWA distributed MySQL binlog storage system built on Raft
License: Apache License 2.0
A distributed MySQL binlog storage system built on Raft
License: Apache License 2.0
Hi
please help me, i have a question:
I don't understanding what type of replica RBR or SRB or Mixed is supported by KingBus
Will this work on mariadb 10.4?
底层raft采用的是http协议进行交互的吗?
Hi there,
Sorry, I don't know where I should ask the question.
I had 3 nodes kingbus and 10 slaves node. Kingbus was binlog server real master A. Master B was a slave master A. Now, we have some issues with master A and we want to change the real master for kingbus cluster. Should we do now? What is the script in the situation?
+--------+ +----------+
|master A| ------------replicated----------------------------------| master B |
+--------+ +----------+
^
|
|
[ kingbus 1-3] <---------------------replicate [slave 1-10]
Thank you!
今天稍微看了下文档.
是不是说binlog会存3份? 那么是否有类似Arbitrator的功能, 这样一个仲裁节点只负责仲裁. 只有两个节点存数据?
slave 报错
Last_IO_Errno: 1105
Last_IO_Error: The slave I/O thread stops because a fatal error is encountered when it try to get the value of SERVER_ID variable from master. Error: mysql:sql not support
kingbus报错
2019-07-08T15:50:00.397+0800 info mysql/command.go:119 handleQuery sql:SELECT UNIX_TIMESTAMP()
2019-07-08T15:50:00.398+0800 info mysql/command.go:119 handleQuery sql:SHOW VARIABLES LIKE 'SERVER_ID'
2019-07-08T15:50:00.399+0800 debug mysql/command.go:283 show query showVariable:
2019-07-08T15:50:00.399+0800 error mysql/conn.go:151 dispatch error,err:mysql:sql not support,data:[3 83 72 79 87 32 86 65 82 73 65 66 76 69 83 32 76 73 75 69 32 39 83 69 82 86 69 82 95 73 68 39]
2019-07-08T15:50:00.399+0800 debug mysql/conn.go:135 close client connection
如何解决?
看了代码跟设计架构,作为一个中间件直接介入到数据库集群中,感觉存在这样几个问题:
感觉这个东西做个binlog server来备份、分发数据什么的还可以,至少比canel少了一堆组件要部署,但是作为中间件连接master和slave,感觉稍微有些鸡肋啊。
[root@node04 mysql]# curl -H "Content-Type:application/json" -X PUT --data '{"syncer_id":1023306,"syncer_uuid":"274176a0-e96a-11e8-9645-000c293ddb5","mysql_addr":"192.168.73.102:3306","mysql_user":"repl","mysql_password":"Repl@2018","semi_sync":true}' http://192.168.73.104:9697/binlog/syncer/start
404 page not found
Hi there,
I'm a newbie and have been using kingbus for 3 days. Can I rotation kingbus binarylog? I can't find on the docs.
Thank you!
cc: @flike
通过代码发现:syncer获取mysql master的连接配置,是通过raft协议传递的,而不是通过配置的方式,通过代码暴露出的http接口,也没有找到能通过http设置mysql的连接配置的地方,请问该连接配置,怎么通知集群的?
BinlogServer的启动时通过http接口,用户主动开启,然后等待mysql slave的tcp 连接。
有实际测试过吗
另外希望有更多的文档.
在启动binlog syncer时报错:
curl -H "Content-Type:application/json" -X PUT --data '{"syncer_id":173,"syncer_uuid":"f7e30637-f15a-11e8-accc-244427b6b60e","mysql_addr":"x.x.x.x:3306","mysql_user":"root","mysql_password":"root","semi_sync":false}' http://server_ip:5000/binlog/syncer/start
{"message":"binlog_server:args are not available"}
以下是日志信息:
2019-03-12T11:10:56.675+0800 info replication/binlogsyncer.go:136 create BinlogSyncer with config {173 f7e30637-f15a-11e8-accc-244427b6b60e mysql x.x.x. 3306 root utf8 false false false UTC true 0 10s 20s 3 true}
2019-03-12T11:10:56.677+0800 error server/server.go:869 NewSyncer:binlogProgress reset error,err:invalid interval format, must n[-n]
2019-03-12T11:10:56.677+0800 error server/server.go:813 startSyncerServer error,err:invalid interval format, must n[-n],args:{173 f7e30637-f15a-11e8-accc-244427b6b60e x.x.x.x:3306 root root false}
2019-03-12T11:10:56.677+0800 error api/binlog_syncer_handler.go:86 StartServer error,err:binlog_server:args are not available,args:{173 f7e30637-f15a-11e8-accc-244427b6b60e x.x.x.x:3306 root root false}
2019-03-12T11:10:56.677+0800 error api/binlog_syncer_handler.go:51 StartBinlogSyncer error,err: binlog_server:args are not available
这个问题该如何解决?
另外在查看当前运行的binlog syncer时,发现有个syncer_id=0的同步任务,这个任务的功能是什么?
能否提供删除syncer的删除接口处理?
curl -H "Content-Type:application/json" -X GET http://server_ip:5000/binlog/syncer/status {"message":"success","data":{"syncer_id":0,"syncer_uuid":"","mysql_addr":"","mysql_user":"","mysql_password":"","semi_sync":false,"current_gtid":"","last_binlog_file":"","last_file_position":0,"executed_gtid_set":"","purged_gtid_set":"","status":"stopped"}}
在异步复制架构中,master宕机时,如果部分binlog event未及时发送,会导致事务丢失。同样的,在使用mysqlbinlog工具做binlog server时,也会存在这种问题,并且由于操作系统机制,可能会有更多的情况产生。
请问,该工具能否支持半同步复制,或者是否有额外的措施用以弥补上述缺陷,谢谢!
syncer_id、syncer_uuid的值是用主库的,还是自己随机写?另外为啥syncer_id指为0,leader会被干掉?
一套kingbus集群中只能有一个syncer,是否表示一套kingbus集群只能同步保存一个实例的binlog?能否做到同时同步多个实例的binlog?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.