Re: NDBCluster active-acitve connections.
The details depend on what language/API your application uses, but the general idea is this:
1. Have two connection strings available in your application, one for each SQL node. (I say "connection string", but of course your language/API may have a different way of encoding connection info, and it's two of these that you should have in your application.)
2. Try the transaction using one of these.
3. If the transaction fails, check the error that it failed with. (MySQL error codes and related info can be found
here.)
4. If the error indicates that the transaction failed due to the SQL node/MySQL server not being available (server down, timeout, etc.), retry the transaction using the connection data for the other connection.
Again, the specifics depend on the language/API used by your application, but that's the general idea.
cheers,
Jon Stephens
MySQL Documentation Team @ Oracle
MySQL Dev Zone
MySQL Server Documentation
Oracle