Hakim Sędzia
Hakim Sędzia

Reputation: 11

Starting MySQL Cluster

Im new to clustering and Im doing a project on cluster database. I want to make use of MySQL Cluster. Im using it for a small scale database and this is my plan:

5 node: 1 management node, 2 SQL node, 2 API node.

My questions are:

1) Is my plan for the node process alright?

2) What should I do when I got the error "Failed to allocate node id..."?

3) Is it a requirement to use multi-threaded data node?

4) Where do I place my web server page for the user to access the database?

Please reply. Thank you so much.

Upvotes: 1

Views: 131

Answers (1)

Skillachie
Skillachie

Reputation: 3226

This answer might be a little late but can be helpful for someone else getting started:

1) Is my plan for the node process alright?

Your plan for the node process is ok for a small cluster. I would recommend adding an additional management node and 2 more Data Nodes if the number of replicas you have configured is 2. Reason being since you currently have only 2 data nodes, your cluster will not be functionally should once of those nodes "die" . This is because of the two-phase commit that takes place. In the case of a faiure only 1 data node will be able to persist the data , the other one would be unreachable and therefore the transaction would be marked as incomplete.

2) What should I do when I got the error "Failed to allocate node id..."?

This error is usually thrown if you have assigned the same id to other nodes in your configuration file. Each node should have a unique Id.

3) Is it a requirement to use multi-threaded data node?

It is not a requirement but recommended. Using mulch-threaded data node allows you to leverage modern computer architecture with multiply cpus to allow for your data processing queries to be processed much faster. As a result updates and queries will be done much faster

4) Where do I place my web server page for the user to access the database?

Hmm.Not sure why you want to achieve here. This would be a separate question, if you are using PHP or usually any other language. You will have to have a web server configured. Place them in the root of the http directory to get started

Upvotes: 1

Related Questions