List:Cluster« Previous MessageNext Message »
From:Geert Vanderkelen Date:September 7 2009 1:17pm
Subject:Re: Unable to configuring multiple Management nodes.
View as plain text  
Hello Manoj,

Please recheck how MySQL Cluster actually works before continuing!

On Sep 7, 2009, at 14:27, Manoj Burande wrote:
..
> On host: 192.168.1.107:
> =======================
> 1] MGMT Node
> 2] DATA Node
> 3] MYSQL[API] Node
>
> On host: 192.168.1.125:
> =======================
> 1] MGMT Node
> 2] DATA Node
> 3] MYSQL[API] Node

If this is a test setup, then OK.
BUT!
In production, you should have at least 3 machines:
- 2 machines running each ndbd's: the Data nodes
- 1 machine running ndb_mgmd (Management node) and mysqld (SQL Node)

You can add a 4th machine which will run mysqld and other ndb_mgmd.

> Both the servers are placed behind "load balancer" to manage incoming
> connections. So the incoming connections or requests to the server  
> will be
> managed(distribute) by load balancer to control traffic on the server.

If you want to use a 'load balancer', you should only use it to load- 
balance the SQL Nodes, the mysqld processes.

..
> "config.ini" On host: 192.168.1.107:
> ====================================

And this is wrong. If you put config.ini on both machines which are  
running ndb_mgmd, then they should be _exactly_ the same.

>
> [NDBD DEFAULT]
> NoOfReplicas=2    # Number of replicas
> DataMemory=3500M    # How much memory to allocate for data storage
> IndexMemory=1000M   # How much memory to allocate for index storage
> datadir=/usr/local/mysql/data   # Directory for this data node's  
> datafiles
..
> [NDB_MGMD]
> hostname=192.168.1.107           # Hostname or IP address of MGM node

You need *2* NDB_MGMD sections, because you have 2 management nodes.

>
> # Options for data node "A":
> [NDBD]
> id=3                             # (one [NDBD] section per data node)
> hostname=192.168.1.107           # Hostname or IP address
>
> # Options for data node "B":
> [NDBD]
> id=4
> hostname=192.168.1.125          # Hostname or IP address
>
> # SQL node options:
> [MYSQLD]
> id=5
> hostname=192.168.1.107

This not so important to get it running, but you _should_ have a few  
slots for API or MYSQLD open. So add a few (4?) empty [API] slots at  
the end.

> "config.ini" On host: 192.168.1.125:
> ====================================

If you use MySQL Cluster 7.0, then 192.168.1.125 does not need a  
config.ini. It will fetch the configuration from the 1st ndb_mgmd if  
you give it the connect-string and its node-id.

> To create the replication between two data nodes. Means if one  
> server goes
> down or crashes then automatically the same data should be served by
> another one live server.

You do not need to setup replication between data nodes, you already  
did: NoOfReplicas=2. This way if you have 2 data nodes, each will have  
a replica of the other's data.

..
> Connected to Management Server at: 192.168.1.125:1186
> Cluster Configuration
> ---------------------
> [ndbd(NDB)]	2 node(s)
> id=3 (not connected, accepting connect from 192.168.1.107)
> id=4	@192.168.1.125  (mysql-5.1.34 ndb-7.0.6, Nodegroup: 0, Master)
>
> [ndb_mgmd(MGM)]	1 node(s)
> id=1	@192.168.1.125  (mysql-5.1.34 ndb-7.0.6)
>
> [mysqld(API)]	1 node(s)
> id=5	@192.168.1.107  (mysql-5.1.34 ndb-7.0.6)
>
>
> The above resulted out put shows that the both data nodes from each  
> server
> are not able to communicate with each other. So please tell me the  
> proper
> configuration or the proper steps to implement my scenario perfectly.

No, they are not, because you actually created 2 MySQL Cluster's.

Please check again our manual on dev.mysql.com to check how MySQL  
Cluster works.
Or check my blog post, and leave comments if something wasn't clear!
  http://blog.some-abstract-type.com/2009/08/how-to-start-mysql-cluster-70-with-2.html

Try first to get 2 data nodes up with 1 ndb_mgmd (one [NDB_MGMD]  
section), just to start with.

config.ini

[NDBD DEFAULT]
NoOfReplicas=2
DataMemory=3500M
IndexMemory=1000M
datadir=/usr/local/mysql/data
[NDB_MGMD DEFAULT]
datadir=/var/lib/mysql-cluster
[NDB_MGMD]
hostname=192.168.1.107
id=1
[NDBD]
id=3
hostname=192.168.1.107
[NDBD]
id=4
hostname=192.168.1.125
[MYSQLD]
id=5
hostname=192.168.1.107
[API]
[API]

On machine 192.168.1.107 launch
  shell> ndb_mgmd -f config.ini --configdir /path/to/cache/dir
  shell> ndbd -c 192.168.1.107
On machine 192.168.1.125
  shell> ndbd -c 192.168.1.107

Cheers,

Geert


-- 
Geert Vanderkelen, MySQL Senior Support Engineer
Sun Microsystems GmbH     Sonnenallee 1, D-85551 Kirchheim-Heimstetten

Geschaeftsfuehrer: Thomas Schröder, Wolfgang Engels, Wolf Frenkel
Vorsitz d. Aufs.rat.: Martin Haering                    HRB MUC 161028

Thread
Re: Unable to configuring multiple Management nodes.Geert Vanderkelen31 Aug
  • Re: Unable to configuring multiple Management nodes.Manoj Burande31 Aug
Re: Unable to configuring multiple Management nodes.Geert Vanderkelen31 Aug
  • Re: Unable to configuring multiple Management nodes.Geert Vanderkelen31 Aug
    • Re: Unable to configuring multiple Management nodes.Johan Andersson31 Aug
      • Re: Unable to configuring multiple Management nodes.Manoj Burande1 Sep
Re: Unable to configuring multiple Management nodes.Geert Vanderkelen1 Sep
  • Re: Unable to configuring multiple Management nodes.Hendrik Woltersdorf1 Sep
  • Re: Unable to configuring multiple Management nodes.Manoj Burande7 Sep
Re: Unable to configuring multiple Management nodes.Geert Vanderkelen7 Sep
  • Re: Unable to configuring multiple Management nodes.Manoj Burande10 Sep