Using MMM when no network control is available

MMM depends on the ability of the machines in the network to have floating IP addresses and to send ARP notifications to the network peers.

Unfortunately, computing clouds (such as Amazon EC2) do not enable this feature, and you have no control over the IP addresses of your machines.

Therefore, the ns_agent contribution was made in order to allow the use of MMM in an environemnt where modifications on the network level are not available, but you do have control of a nameserver in the network.

Status

This contribution is an initial attempt, and is very experimental. Should consider the reliability implication of using a nameserver and the name resolving process in a delicate high-availability environment.

So far, tested on a staging cluster on EC2, functioned well.

Awaiting community feedback.

To Do

* Convert ns_agent to Perl (currently written in PHP) * Clean up code from commented out sections * Test on several environments and several usecases

Location

Currently in contrib/ns_agent

How To Use

1. Run ns_agent.php (accompanied by mmm_ns_agent.conf) on the nameserver machine.

2. Add the following section to mmm_agent.conf on all database nodes:

  nameserver <<nameserver_name>>
    ip <<nameserver ip address>>
    port <<ns_agent port>>

3. Replace /usr/local/mmm/lib/ifconfig.pm with the one provided with this contribution.

4. On the mmm monitor daemon config (mmm_mon.conf), replace any occurence of the floating IP address with the FQDN of the relevant host. For example:

Replace:

role writer
     mode exclusive
     servers ec2_db1
     ip 192.168.100.101

With:

role writer
     mode exclusive
     servers ec2_db1
     ip writer.mydomain.com

5. Configure the nameserver to answer queries for mydomain.com, have very low TTL, and make sure the zone file name matches the one in mmm_ns_agent.conf.

6. Set all the machines resolver to your nameserver.

mmm1/nsagent.txt · Last modified: 2009-06-02 08:03 by Pascal Hofmann
CC Attribution-Share Alike 3.0 Unported

MySQL is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Multi-Master Replication Manager for MySQL is in no way affiliated or associated with MySQL AB.

www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0