简体   繁体   English

查询Percona群集节点的当前负载

[英]Query Percona Cluster Nodes For Current Load

I'm attempting to put together a mysql load balancer with a mockup php like script. 我正在尝试将mysql负载均衡器与脚本样机php放在一起。 Problem is i've been looking about countless variables in the database and cant find a variable of the current load on that server so I can pick the faster server to give the client. 问题是我一直在寻找数据库中无数的变量,并且找不到该服务器上当前负载的变量,因此我可以选择速度更快的服务器来提供客户端。

Mysql is not aware of the server resource use, so what to do is to use for example Cacti, get the data from there and use that in your loadbalancing app. Mysql不了解服务器资源的使用,因此要做的是使用例如Cacti,从那里获取数据,然后在您的负载平衡应用程序中使用它。

Another way is just to use round robin and assume the systems will be pretty normally distributed over time. 另一种方法是使用轮询,并假设系统会随着时间的推移呈正态分布。

Third option is to auto scale the number of slave servers using for example Kubernetes with NFS & ZFS for central storage and making snapshots of the database available on the slave nodes (for a read only solution 第三种选择是使用例如带有NFS和ZFS的Kubernetes来自动扩展从服务器的数量以进行中央存储,并使数据库快照在从节点上可用(对于只读解决方案)

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

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