Portal Home > Knowledgebase > Industry Announcements > Web Hosting Main Forums > Mysql Cluster


Mysql Cluster




Posted by 3FRSB, 11-25-2013, 02:17 AM
Hi,

Does anyone here done this on production? I using mysql cluster gpl and HAproxy to make load balancer on node1 and node2.

LB IP: 10.10.0.10 (virtual IP)
node1: 172.17.0.90
node2: 172.17.0.80

When i connect from other host using this command, it fail.
Code:
[root@svr-console bin]# mysql -u root -p -h 10.10.0.10 -P 3305
Enter password:
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
Any idea why?

haproxy.cfg
http://pastebin.com/9QDamVck

Thanks.

Posted by Natcoweb-Peter, 11-25-2013, 12:32 PM
Hello,

I have a setup of 3 nodes mysql cluster with master-master replication using percona xtradb setup.
I was using the HAproxy and tried both load balancing and also active-backup but the haproxy was having problem mostly with writes on the mysql nodes. Therefore I have disabled it and I am looking into another solution maybe using mysql-proxy which also know read-write split. Therefore I could use 3 nodes for read and one node only for writes.

Posted by 3FRSB, 11-25-2013, 07:11 PM
I already tried with mysql-proxy. Process dead in a few minute when I access using application.

Posted by Natcoweb-Peter, 11-25-2013, 07:29 PM
Try for the haproxy the following configuration in haproxy.cfg
frontend mysql-front
bind 10.0.0.20:3305
mode tcp
maxconn 500000
default_backend mysql-back

backend mysql-back
balance leastconn
mode tcp
option httpchk
server node1 ip_node1:3306 check port 9200 inter 12000 rise 3 fall 3
server node2 ip_node2:3306 check port 9200 inter 12000 rise 3 fall 3
server node3 ip_node3:3306 check port 9200 inter 12000 rise 3 fall 3

Posted by 3FRSB, 11-25-2013, 07:38 PM
When using mode tcp, cannot use backend or frontend. I already tried that. Mode tcp not valid. Mode http is valid.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Which is VPS type? (Views: 1730)

Language: