Make MySQL refuse connections until data nodes are started

MySQL Cluster 6.3.28 and 7.0.9 introduce the MySQL server option --ndb-wait-setup. This makes sure that clients can not connect the SQL Node when no Data Nodes are available within, by default, 15 seconds. When the timeout is reached, and no Data Nodes are available, the NDB storage engine will be marked as unavailable.

The following will appear in the MySQL server error log when --ndb-wait-setup=30 has been set:

 [Note] NDB: NodeID is 10, management server 'ndbsup-priv-1:1406'
 [Note] NDB[0]: NodeID: 10, **no storage nodes connected (timed out)**
 [Note] Starting Cluster Binlog Thread
 [Note] Event Scheduler: Loaded 0 events
 [Note] NDB Binlog: Ndb tables initially read only.

 .. 30 seconds later..

 [Warning] NDB : Tables not available after 30 seconds.
    Consider increasing --ndb-wait-setup value
 [Note] /data1/mysql/5.1.39_6.3.28/libexec/mysqld: ready for connections.

Use case: when doing an installation and you start Data and SQL Nodes quickly after each other. Normally, services which connect to a MySQL server (which is connect to a MySQL Cluster) will have failures because NDB tables are not yet available. With --ndb-wait-setup option set, they will not even be able to connect. It could help in some automated install scenarios where you want to make sure clients can’t do anything until Data Nodes are available.

Stay tuned for the binaries due first half of November (2009). Source is already available for MySQL Cluster 7.0.9 and 6.3.28.

Comments

Eli McGowan

The --ndb-wait-setup link results in a page that does not contain any information about --ndb-wait-setup… If one exists, I recommend changing the link. If one doesn’t exist, I recommend eliminating the link since it is misleading and not helpful.

Browser Compatibility: The paragraph starting with “[Note] NDB: NodeID” is cut short in Firefox and Chrome.

Thanks

Geert Vanderkelen
@Eli McGowan Thanks! I’ve update the post (still lots of them needs updating after the move from Blogger). The link was indeed broken, and is now pointing correctly to the MySQL manual.