0

I installed MySQL cluster and every thing is working well, however I don't know how to implement horizontal sharding in my database.

Detail:

  • I have 2 data node: Node1 and Node2.
  • I created database Test with one table T1(key(int), field1..).

I want to write 50% of the records of T1 into Node1 (odd value of key), and 50% of the records into Node2 (even value of key).

I was looking through the documentation but have not found the answer to my problem.

  • dba.stackexchange.com/questions/tagged/sharding+mysql -- Study most of them. Then come back with a more specific question -- on client, on proxy, on load balancing, on cross-node querying, on ... – Rick James Nov 16 at 22:18
  • @RickJames:thanks for answering but I was looking through the documentation but have not found the answer to my problem. – muon.ha Nov 17 at 6:13
  • Here's a search to use: google.com/… – Rick James Nov 17 at 17:14
  • @RickJames : I have found a suitable tool is MySQL Fabric. I'm learning about it. Thank you very much – muon.ha Nov 17 at 19:36
  • Absolutely not. Fabric was abandoned a few years ago, probably because it failed to perfect a key feature. It had a "single point of failure" and they could not work around it without a major redesign. I would say that neither Oracle (MySQL) nor MariaDB nor Percona has a built-in sharding mechanism. The various Proxy packages are addons that look promising. Most of the big folks Y, G, FB, etc, invent their own. – Rick James Nov 17 at 22:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.