简体   繁体   English

Galera Cluster 可以有多个写入器吗?

[英]Can Galera Cluster have multiple writers?

I am currently running a Galera Cluster in Kube.netes.我目前在 Kube.netes 中运行一个 Galera 集群。 The problem I am having is whenever I use a replicaset for Galera it causes problems.我遇到的问题是,每当我为 Galera 使用复制集时,它都会导致问题。 The problems stems from the service I have calling the first node I deploy as the "Write" member.问题源于我调用我部署为“写入”成员的第一个节点的服务。 The other two members are then designated as "Readers".其他两名成员随后被指定为“读者”。 If the "Write" member goes down, it causes my other two pods to crash even though they are all deemed as Masters within the MySQL database.如果“写入”成员出现故障,它会导致我的其他两个 pod 崩溃,即使它们在 MySQL 数据库中都被视为主节点。

I was looking into workarounds for this but I was wondering if any of you had any experience with this.我正在寻找解决方法,但我想知道你们中是否有人对此有任何经验。 I saw about using a Write LoadBalancer Proxy like ProxySQL or MaxScale but I don't know if these specifically tackle the problem I am having.我看到了使用像 ProxySQL 或 MaxScale 这样的 Write LoadBalancer 代理,但我不知道这些是否专门解决了我遇到的问题。 I also do not know enough about Kube.netes if I could choose multiple "write" members in Kube.netes with just more service yaml files.我也不太了解 Kube.netes,如果我可以在 Kube.netes 中选择多个“写入”成员,只需要更多服务 yaml 文件。

Consider to setup ProxySQL.考虑设置 ProxySQL。 Add the instances in the same group at mysql_servers.在 mysql_servers 的同一组中添加实例。 Next, declare the max_writers = 3 in mysql_galera_hostgroups.接下来,在 mysql_galera_hostgroups 中声明 max_writers = 3。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM