使用 MySQL Proxy 进行 MySQL 故障转移

发布于 2024-07-10 23:09:51 字数 409 浏览 9 评论 0原文

我正在考虑使用 MySQL Proxy (http://forge.mysql .com/wiki/MySQL_Proxy

我建议的设置如下:一台主动 MySQL 服务器和一台被动 MySQL 服务器,并在两者之间启用双向复制。 MySQL 代理是位于这两台服务器之间的故障转移,并在活动服务器发生故障时将流量重定向到备用服务器,反之亦然。

只是想了解社区关于使用 MySQL Proxy 作为两个 MySQL 服务器的故障转移工具的经验。 有什么我应该注意的问题吗? 还有其他可以即兴设置的技巧/调整/技巧吗?

哦,我使用的是 Windows,因此需要 MySQL 代理。

I'm looking at implementing a failover mechanism for a MySQL database using MySQL Proxy (http://forge.mysql.com/wiki/MySQL_Proxy)

My proposed setup is as follows: One active MySQL server and one passive MySQL with two way replication enabled between the both of them. MySQL Proxy is the failover that sits in between these two servers and redirects traffic to the standby in case the active fails and vice versa.

Just wanted to know the community's experience here about using MySQL Proxy as a failover tool for two MySQL servers. Any gotchas that I should be looking at? Any other tips/tweaks/hacks that can improvise this setup?

And oh, I'm on Windows and hence the need for MySQL Proxy.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

春风十里 2024-07-17 23:09:51

MySQL Proxy 是一个有效的解决方案,很多人已经将它用于高流量生产系统。 有几件事需要记住:

  • 它仍处于 Alpha 阶段,因此您确实希望在实施之前对其进行彻底测试。
  • 如果代理服务器出现故障,您的应用程序应该具有故障转移方法。 如果它是一个网站,可能会显示“我们很快就会回来”的消息和通知系统,告诉您该网站已关闭。 MySQL Enterprise Manager 对此非常有用,尽管它确实要花钱。
  • 与硬件负载均衡器相比,它会增加更多的延迟,但它允许您使用 Lua 对其进行更多自定义。

MySQL Proxy is a valid solution, plenty of people have been using it for high traffic production systems. There are a few things to remember:

  • It's still in Alpha, so you really want to test it thoroughly before implementing it.
  • Your application should have a failover method if the Proxy server goes down. If it's a website, perhaps a "we'll be back shortly" messsage and a notification system to tell you that it's down. MySQL Enterprise Manager is pretty good for this, though it does cost money.
  • It will add more latency than a hardware load balancer, but it will allow you to customize it much more with Lua.
百思不得你姐 2024-07-17 23:09:51

我使用 MySQL 代理已经有一段时间了,发现它非常有用。 然而,与 0.6.0 相比,0.6.1 版本似乎引入了新的错误。 因此,您在选择版本时可能需要小心。 我认为这是一个用于故障转移和查询注入的出色产品,但由于它处于 Alpha 阶段,因此出现错误是可以预料的。

http://forums.mysql.com/read.php? 146,202953,202953#msg-202953

I've been using MySQL proxy for sometime now and found it to be very useful. However there seems to be new bugs introduced in 0.6.1 version as compared to 0.6.0. So you might want to be careful in choosing the versions. I think that this is a great product for failover and query injections, but since its in Alpha, bugs are to be expected.

http://forums.mysql.com/read.php?146,202953,202953#msg-202953

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文