Results 1 to 9 of 9

Thread: Mysql Cluster

  1. #1
    Join Date
    Mar 2013
    Posts
    673

    Mysql Cluster

    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.

  2. #2
    Join Date
    Nov 2013
    Posts
    97
    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.

  3. #3
    Join Date
    Mar 2013
    Posts
    673
    I already tried with mysql-proxy. Process dead in a few minute when I access using application.

  4. #4
    Join Date
    Nov 2013
    Posts
    97
    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

  5. #5
    Join Date
    Mar 2013
    Posts
    673
    When using mode tcp, cannot use backend or frontend. I already tried that. Mode tcp not valid. Mode http is valid.

  6. #6
    Join Date
    Mar 2013
    Posts
    673
    Now i facing new error. When load table without data, it will stop as below:
    Code:
    2013-12-11 15:45:25 [MgmtSrvr] INFO     -- Node 2: Data usage is 1%(41 32K pages of total 2560)
    2013-12-11 15:45:25 [MgmtSrvr] INFO     -- Node 2: Index usage is 12%(292 8K pages of total 2336)
    2013-12-11 15:45:25 [MgmtSrvr] INFO     -- Node 2: Resource 0 min: 2646 max: 10695 curr: 3954
    2013-12-11 15:45:25 [MgmtSrvr] INFO     -- Node 2: Resource 3 min: 3144 max: 3144 curr: 625
    2013-12-11 15:45:25 [MgmtSrvr] INFO     -- Node 2: Resource 5 min: 1152 max: 1152 curr: 1088
    2013-12-11 15:45:25 [MgmtSrvr] INFO     -- Node 2: Resource 7 min: 2240 max: 2240 curr: 2240
    2013-12-11 15:45:25 [MgmtSrvr] INFO     -- Node 2: Resource 9 min: 64 max: 0 curr: 1
    2013-12-11 15:45:25 [MgmtSrvr] INFO     -- Node 3: Data usage is 1%(41 32K pages of total 2560)
    2013-12-11 15:45:25 [MgmtSrvr] INFO     -- Node 3: Index usage is 12%(292 8K pages of total 2336)
    2013-12-11 15:45:25 [MgmtSrvr] INFO     -- Node 3: Resource 0 min: 2646 max: 10695 curr: 3954
    2013-12-11 15:45:25 [MgmtSrvr] INFO     -- Node 3: Resource 3 min: 3144 max: 3144 curr: 625
    2013-12-11 15:45:25 [MgmtSrvr] INFO     -- Node 3: Resource 5 min: 1152 max: 1152 curr: 1088
    2013-12-11 15:45:25 [MgmtSrvr] INFO     -- Node 3: Resource 7 min: 2240 max: 2240 curr: 2240

  7. #7
    Join Date
    Mar 2013
    Posts
    673

  8. #8
    Join Date
    Nov 2013
    Posts
    97
    This does not give too many informations. Can you tell what version of mysql are you using. What is the cluster configuration?
    You have any kind of errors in the logs?

  9. #9
    Join Date
    Mar 2013
    Posts
    673
    I manage to load table and data. Adding this in config.ini
    Code:
    MaxNoOfAttributes = 2500
    MaxNoOfOrderedIndexes = 25000

Similar Threads

  1. MySQL cluster
    By supiiik in forum Dedicated Server
    Replies: 5
    Last Post: 01-27-2011, 01:45 PM
  2. MySQL Cluster How-To
    By sh4ka in forum Hosting Security and Technology
    Replies: 2
    Last Post: 02-01-2010, 09:55 AM
  3. mysql cluster how to
    By aravindboss in forum Hosting Security and Technology
    Replies: 2
    Last Post: 04-03-2008, 01:26 PM
  4. NDB - Mysql Cluster
    By ti_nhatrang in forum Hosting Security and Technology
    Replies: 2
    Last Post: 03-21-2008, 03:48 PM
  5. MySQL cluster
    By kgp43 in forum Dedicated Server
    Replies: 58
    Last Post: 05-12-2006, 10:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •