mysql读写分离问题

16 views
Skip to first unread message

狗尾草

unread,
Sep 17, 2010, 3:37:17 AM9/17/10
to imy...@googlegroups.com
目前实现了master和slave,目前使用Amoeba 实现读写分离。

Q4准备在项目中实现,读写分离,不再依赖第三方工具实现,这样更易于控制。

1.请问若增加N台slave服务器,如果实现负载均衡?需要什么工具?mysql proxy使用过,感觉不稳定。
2.master有没有负载均衡的方案?两台服务器同时运行,提供服务,一台故障,服务转向正常的那台。如果说热备份,其中一台只能处于运行状态,但不能提供服务,感觉有些浪费。

walkerxk

unread,
Sep 17, 2010, 8:16:18 AM9/17/10
to [MySQL中文用户群]
用heartbeat做高可用。一般热备都是做HA的,要么就是主写,从读。

> Twitter <http://twitter.com/hunkguo>http://www.fftcn.com

狗尾草

unread,
Sep 21, 2010, 12:59:46 AM9/21/10
to imy...@googlegroups.com
各位,应该有人做过多个slave的方案吧,能分享下方案不?





2010/9/17 狗尾草 <guo...@gmail.com>
--
您收到此邮件是因为您订阅了 Google 网上论坛的“[MySQL中文用户群]”论坛。
要向此网上论坛发帖,请发送电子邮件至 imy...@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 imysql+un...@googlegroups.com
若有更多问题,请通过 http://groups.google.com/group/imysql?hl=zh-CN 访问此网上论坛。

Wellming Li

unread,
Sep 21, 2010, 1:10:03 AM9/21/10
to imy...@googlegroups.com
要看你的应用,根据应用类型的不同,分的策略也不通。


2010/9/21 狗尾草 <guo...@gmail.com>

狗尾草

unread,
Sep 21, 2010, 2:04:25 AM9/21/10
to imy...@googlegroups.com
现在我只需要最简单的。多个slave,web程序如何处理多个连接并在故障时自动切换?

向翔

unread,
Sep 21, 2010, 2:37:51 AM9/21/10
to imy...@googlegroups.com
在连接DB的那个类里面做个错误捕获不就可以了
谢谢!



                           向翔

phoenix yang

unread,
Sep 25, 2010, 5:18:51 AM9/25/10
to imy...@googlegroups.com
这个自己在程序里实现错误处理不就好了。
Reply all
Reply to author
Forward
0 new messages