用了几个高 star 的项目,立马发现 bug 出来。不能在生产环境用。
不知道有没有简单的只支持读写分离的项目,几个项目感觉是 KPI 出来的,极其复杂。 功能很多,bug 也很多。
我的需求:
A => RW-proxy-server => 写:主库 || 读:slave0,slave1
不需要其他什么乱七八糟的分表功能。
隐约觉得应该有这样专注的项目,可能是用 golang 写的。 求推荐
1
F281M6Dh8DXpD1g2 Mar 1, 2021
你要的这个本来就足够复杂了,随便写写肯定 bug 满天飞
|
2
py88pQ2hZ7PJw0v4 Mar 1, 2021
|
3
zealinux OP @DollarKiller 关键不在复制,而是现在已经创建了一个副本。
关键点应该中间服务包装 mysql 协议,鉴权,解析 sql 和分发流量 |
4
py88pQ2hZ7PJw0v4 Mar 1, 2021
@zealinux 文档看仔细点 Server package supplies a framework to implement a simple MySQL server which can handle the packets from the MySQL client. You can use it to build your own MySQL proxy. The server connection is compatible with MySQL 5.5, 5.6, 5.7, and 8.0 versions, so that most MySQL clients should be able to connect to the Server without modifications.
|
5
bthulu Mar 1, 2021
mysql 客户端我记得原生支持读写分离的啊, 什么服务都不需要用
|
6
bthulu Mar 1, 2021
jdbc 里直接在 url 里设好就行了, jdbc:mysql:replication://master:3306,slave1:3306,slave2:3306/test
当事务为 readonly 的时候, jdbc 驱动会自动去 slave 读数据. |
7
dfzj Mar 1, 2021
shardingsphere
|
8
SmiteChow Mar 2, 2021
A 自己肯定知道操作是读 /写,不需要代理。
|
9
xiaoyanbot Nov 5, 2021
有意思, 值得关注
|
10
xiaoyanbot Nov 5, 2021
|