Question

I want to create a MySQL NDB cluster on Hyper-V for testing so I have some questions in this regard.

  1. Can I use Windows XP 32 bit? (because I already have a VM) If not then can I use Windows 7 or 10?
  2. Do I only need one VM where both nodes will be installed (I don't know if MySQL supports multiple instances or something like that) or do I need at least two VMs?
  3. I read that NDB cluster require load balancer. Can I do it without load balancer? I mean I will manually run statements (Insert/Update/Delete) on server1 to check if it goes to server2 or not instead of using some PHP application.
  4. Do I need free version of MySQL or some enterprise version?
  5. Do I only need MySQL or some other software also needed to setup cluster?
Was it helpful?

Solution

Can I use Windows XP 32 bit? (because I already have a VM) If not then can I use Windows 7 or 10?

You have the list of supported platforms here: http://www.mysql.com/support/supportedplatforms/cluster.html

From there I can see there are 32-bit binaries, and several windows versions, but check your specific combination. I would suggest not using 32-bit binaries/OS when possible for MySQL due to memory limitations, but you say it is

for testing

So I assume that for a small (< 2GB data) test that is ok?

Do I only need one VM where both nodes will be installed (I don't know if MySQL supports multiple instances or something like that) or do I need at least two VMs?

For production, 4 nodes are recommended. You can technically run it on 2 nodes -yes, you can run multiple instances of MySQL (and ndbd) on the same physical server, but again, you are doing a test, so depending which part you care to test more or less realistically it will work for you or not-. Network partitions and latency issues, and memory pressure will not show on a single (or just a few), small, machine test. Even for different VMs on the same physical server, you will not get a realistic scenario. But maybe you are not interested on that, and only on learning how to set it up and/or pure controlled switchover tasks.

I read that NDB cluster require load balancer. Can I do it without load balancer? I mean I will manually run statements (Insert/Update/Delete) on server1 to check if it goes to server2 or not instead of using some PHP application.

Yes, you can do that, but what is the point then, on having a cluster? You want 4 nodes at least (2 SQL and 2 data nodes you can crash at any time and have transparent failover). Why not set up a single Master-slave replication topology (Or master-master, with read only secondary master) in your case?

Do I need free version of MySQL or some enterprise version?

MySQL has a dual-license model. There is a community version of the NDB Cluster. It is free (no cost) but licensed under GPL, which means it has restrictions on how to use it (linked application must also be GPL). If you are an ISV or a developer shop that has some deliverables to clients, you may need to purchase an Enterprise licence. For testing, where you are not going to distribute the server or the application to anyone, you can use the Community edition. I am not a lawyer, read the license or hire one to read it for you.

Do I only need MySQL or some other software also needed to setup cluster?

Aside from really considering a load balancing solution (or integrate it on your application), for a production deployment I would say it is a must to have: a monitoring solution (providing trends and alerts), administration tools that make your life easier. Probably the most important part is someone to adapt your application- MySQL cluster is very different from a typical MySQL/InnoDB setup, and in most cases migrating to that is not transparent for how the application access it (it is more memory and key-value focused).

Here you have summary of differences between MySQL NDB Cluster and other similar concepts:

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top