From: Mikael Ronström Date: August 25 2004 10:08am Subject: Re: Doubts about cluster features List-Archive: http://lists.mysql.com/cluster/462 Message-Id: MIME-Version: 1.0 (Apple Message framework v618) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Hi, 2004-08-24 kl. 18.42 skrev Devananda: > Crouch, Luke H. wrote: > >> you may specify any number (up to hundreds, I believe) of API nodes,=20= >> which are typical mysql servers configured to use the cluster as=20 >> their storage engine rather than their typical data files. in this=20 >> way, you can have multiple mysql servers accepting connections and=20 >> processing queries and all will have the same data. so you may=20 >> round-robin or use some other method to balance your client=20 >> connections to these servers and not worry about data consistency -=20= >> it is handled by the cluster storage engine. >> > I believe there is currently a limit of 64 nodes in the cluster,=20 > counting each DB node, each API node, and the MGM node. I remember=20 > reading that this was an arbitrary compile time limit, but I haven't=20= > heard how to change it. Please correct me if I'm wrong, or if anyone=20= > knows how to change this I would be quite interested :) > The following things needs to be changed (never tested so testing might=20= uncover more things needing change, never had access to bigger cluster=20= than 72 CPU's so the limit of 64 has never been a problem. Currently there are two max's in the limitations. The first is a limitation on the number of DB nodes. The second is a limit on the total number of MGM, API and DB nodes in=20 the system. This limit is set in the file MYSQL_TOP/ndb/include/kernel/ndb_limits.h with the lines /** * Note that actual value =3D MAX_NODES - 1, * since NodeId =3D 0 can not be used */ #define MAX_NDB_NODES 49 #define MAX_NODES 64 As mentioned here node id 0 is not used so 48 DB nodes and 63 nodes in=20= total is the maximum. If anybody updates these parameters ensure that MAX_NODES is a multiple=20= of 32 (96, 128, 160, 192 and so forth). DB nodes can as seen here only use node id 1 - 48. Updating these parameters will make it possible to have more nodes. It=20= will have some negative impact on performance since there are lots of loops from 1 to MAX_NODES and MAX_NDB_NODES.=20 When this will be noticable I have no idea. Actually using more nodes will also slow down select calls since=20= there are more connections to loop over to fetch input. So having more nodes will certainly have some cost=20 attached to it but unknown how big or small. In addition if MAX_NODES is set to more than 128 it is necessary to=20 also update another constant. MAX_NTRANSPORTERS found in MYSQL_TOP/ndb/include/transporter/TransporterDefinitions.h with the line. const int MAX_NTRANSPORTERS =3D 128; Rgrds Mikael PS: In a few days yet another place needs to be updated that is not yet=20 pushed to the public 4.1 clone and this is in the file MYSQL_TOP/ndb/src/common/mgmcommon/ConfigInfo.cpp #define MAX_NODES_STRING "63" where 63 =3D MAX_NODES - 1 > To help try and explain how the cluster functions, as it is quite=20 > different from traditional mysql or oracle databases, I'll attempt a=20= > little ASCII art (wish me luck!) > > > -- any number of normal database clients -- > -- it makes no difference which API node a client connects to -- > [ Apache/php clients ] [ any other normal=20= > mysql clients ] > | =20= > | > / | \ =20= > / | \ > [ API nodes] @ @ @ @ @ @ @ @ @ > > -- here's part of the magic of the cluster, all of the api nodes are=20= > connected to all of the DB nodes automatically -- > -- thus load balancing is performed internally across all the DB nodes=20= > -- > -- it's up to you (the dba/programmer) to load balance across the API=20= > nodes though -- > > [ DB nodes ] D D D =20= > D > (D) (D) (D) =20= > (D) [ NoOfReplicas =3D 2, 3 or 4 ] -- this gives=20= > you a built in failsafe > =20= > if one of the DB nodes crashes, it's=20= > replica automatically and > =20= > almost seamlessly picks up its load > > \ | / > [ MGM node ] > -- the MGM node must be aware of all API and DB nodes, since it is the=20= > central management process (does lots of stuff) -- > > > > I hope that helps :) > > Devananda > Neopets, Inc > > --=20 > MySQL Cluster Mailing List > For list archives: http://lists.mysql.com/cluster > To unsubscribe: =20 > http://lists.mysql.com/cluster?unsub=3Dmikael@stripped > > Mikael Ronstr=F6m, Senior Software Architect MySQL AB, www.mysql.com Clustering: http://www.infoworld.com/article/04/04/14/HNmysqlcluster_1.html http://www.eweek.com/article2/0,1759,1567546,00.asp