using network based replication sandboxes

Asked by Ramon

Hi,

I'm testing a set of scripts that will allow replication failover in a complex replication setup.
In the real-world these scripts operate on master(s)-slave(s) setups that all have a seperate ip address, the slaves are loadbalanced using ipvs / keepalived, we always deploy two masters, one as active master the other as hot-standby.
Each master would have a slavegroup assigned to it, in some cases we deal with intermediate masters which are also slaves for a subset of data coming from a different database servergroup.

I would very much like to use mysql-sandbox as a testing tool, it's great. And would reduce the requirements for my testing environment to basically zero / a single machine.

However to avoid large amount of wrapper code for the current python classes this would involve attaching a separate ipaddress to each mysql-instance in a sandbox.

Is this possible at all ? I had a quick and very superficial look through the sourcecode and the concept of starting different servers on different ports but the same ip-address seems fairly central to the entire codebase.

Ideally I'd start every instance on a additional address in the 127.0.0.0/8 range on the same port.
For example:
 + master1 -> 127.0.0.10
 + master2 -> 127.0.0.11 (replicating off master1)
 + slave1 -> 127.0.0.21 (replicating off master1)
 + slave2 -> 127.0.0.22 (replicating off master1)
 + slave3 -> 127.0.0.31 (replicating off master2)
 + slave4 -> 127.0.0.32 (replicating off master2)

In this setup I would have an easy testing scenario by modifying the /etc/hosts file on the test-machine to match staging/production.

Any suggestions to map this problem into the current sandbox setup would be greatly appreciated.

Regards,

Ramon van Alteren

Question information

Language:
English Edit question
Status:
Answered
For:
MySQL Sandbox Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Giuseppe Maxia (giuseppe-maxia) said :
#1

Thanks for your interest in MySQL Sandbox.
I certainly want to improve its features and make it possible to have replication nodes in several hosts. My first successful attempt at this task is explained in my blog:
http://datacharmer.blogspot.com/2009/06/remote-replication-setup-with-gearman.html

Enhancing the Sandbox to accept several IPs is not difficult. The HOST is referred only in two places: in the template to use a single sandbox, and in the script that defines the replication rules. More complicated is the actual installation of the remote sandboxes, task that I have tried to accomplish in the above blog post.

I will certainly tackle the problem and try to come up with a general purpose solution. Probably the best course of action is decoupling the sandbox from Gearman, and let the user define how to do the practical installation.

There is also another effort to enhance MySQL Sandbox, which probably would meet your needs.
https://lists.launchpad.net/sandbox-developers/msg00012.html
http://darren.oldag.net/2009/04/arbitrary-replicationproxy-topologies.html

Please join the mailing list and discuss this matter there.

Cheers

Giuseppe

Can you help with this problem?

Provide an answer of your own, or ask Ramon for more information if necessary.

To post a message you must log in.