1

现在,我已将后端设置为具有“N”台机器的托管实例组。哪里N in 2 to 5。每台机器内部都安装了一个ProxySQL。

作为持久层,我使用 CloudSQL 设置了 Master/Slave 配置,其中 M 是 slaves 的数量M in 1 to 3

此时,要求是在多个副本之间进行负载平衡查询,我可以为 MIG 的重负载启动,并且需要重新配置 MIG ProxySQL 以绑定到新创建的从属服务器。

例如,在下午 5 点,我的 web 服务将面临高流量,我需要创建更多的 SQL 从站来接受更多的 SQL 连接。所以我将创建多个从属复制。M从1增加到3,N从2增加到4

Now I'm trying to get the best solution for this purpose. One possible solution that I found is to use ProxySQL but with some heavy limitation for the MIG.

The GPC MIG is stateless, and actually doesn't know how many replicas are up and running. Plus when a new MIG instance is created how can it get the new configuration if not all the SQL replicas are yet running?

What is the best implementation for discovery the number of possible healthy SQL replicas and reconfigure the ProxySQL configuration (runtime/disk/memory), maybe with a custom polling of 5 seconds where the VM is asking for new configuration.

Are available already some implementation? What is the best solution? I have found some links but not the best slution for me.

Thanks in advance.

4

0 回答 0