MySQL Replication Testing Development Environment

Is there an easy way to set up the environment on a single computer (or virtual machine) using MySQL replication? I would like to gather proof of the concept of MySQL replication with one instance of Master write and two subordinate instances for reading.

I see how this is done through 2 or 3 virtual machines running on my computer, but this will really start my system. I would prefer that everything runs on the same virtual machine. What is the best way to test scalability solutions like this in a local developer environment?

Thanks for your help,

Dave

+4
source share
2 answers

I think that for really testing MySQL Replication it is important to do this in realistic constraints .

If you put all the replicated nodes in the same operating system, then you will no longer have a bandwidth limit, the data transfer speed will be much higher than what you get if these replicated databases are on different sites.

Everything under one virtual machine is a shortcut for configurations, for example, it does not force you to go through the network configuration .

I suggest you use several virtual machines, even if you need to put them under one physical machine, you can always configure the hypervisor so that packets pass through the router, in which case I / O will be connected by any network interface that has bandwidth.

I see how this is done through 2 or 3 virtual machines running on my computer, but this is really messed up on my system.

You can try to make several virtual machines with the versions of the JeOS (Just Enough OS) operating system that you want. I know that Ubuntu has one, and it can boot into 128 RAM, which allows you to conveniently deploy many cloned virtual machines under one physical machine without a monster.

The next step is to do the same in the cloud (infrastructure as a service, IaaS) provider and try your setup on different geographical sites .

+4
source

If what you are testing is replication between machines, then setting up multiple virtual machines on a virtual private network will be the right environment to test it. If you use Ubuntu Server , you do not need to install more than you need, just give the virtual machines enough space for a basic installation + MySQL + your data. Memory usage can be as little as 256 MB for each virtual machine. All you have to do is pause or shut down the virtual machines when you are not doing the full test.

I had situations when I ran 4 or more virtual machines at the same time on my workstation, either for development or for testing - this is not like taxation if you are not trying to render video in each virtual machine.

0
source

Source: https://habr.com/ru/post/1312656/


All Articles