NDB Management Server Internals
The management server - ndb_mgmd has the following responsibilities:
- Load configuration file and distribute to clients
- node id allocation
- help in arbitration decisions
- allow management clients to connect to control cluster nodes (start, stop, start backup)
- write the cluster log
[edit] MGM Protocol
Using the MGMAPI, client programs connect to the management server TCP socket and issue commands in the rather simple MGM Protocol (also getting replies). The protocol is relatively extensible and is telnet like (you can telnet to the port and issue commands).
A request to the server looks something like:
command param: value param2: value
A response from the server looks something like:
command reply result: value result2: value
It is intentional that there is no "incorrect command" error as this helps with online upgrade where new commands are introduced.
[edit] Source
The main source is in (5.1 directory structure has a storage/ prefix) ndb/src/mgmsrv.
- main.cpp - loads config, starts the MgmtSrvr
- MgmtSrvr.cpp - the management server.
- Services.cpp - implements MgmApiSession - an interface to the management server via the next based mgm protocol.