[Spread-users] Implementing node-driven ip aliasing in Spread/Wackamole

David Turland david.turland at shazamteam.com
Fri May 3 07:09:49 EDT 2002

I feel I am not alone in my requirements:

I have a Spread cluster comprising 'n' slave nodes and 'N' master nodes. Only 
one of the master nodes is (can be) the active master at any one time. The 
other masters are waiting for the master to leave .....  All masters know who 
is the active master (apart from during a transition). The active master 
contains significant state  information which precludes ad hoc changes of 
active master (once a week would be fine ;-) ).

The problem is:
The cluster is required to present a single ip address to the client, this to 
be used (?) by whichever is the active master.

The options I have considered are 

the api doesn't allow forcing heartbeat to switch to a particular master and 
is just read-only. The status information does not seem to extend to 
revealing which master is currently holding the ip address (state seems to be 
active or up) so I cannot even force an (expensive) active master change to 
suit heartbeat's view.

This seems the best contender. wackamole.c certainly offers enough hooks.

Proposed solution:

Configuaration file would be

  vip  public ip address
  of   range of ipaddress of masters

Mods to wackamole.c

- remove the sp_join ('wackamole') call in wackamole.c but still run as normal 
(need the root privileges it is empowered with and don't want to run my app 
as root!)

The other changes are in my app:

- all masters divert membership messages emanating from 'wackamole' sender to 
the   Handle_network() method in wackamole.c

-  active master joins 'wackamole' group

-  non-active masters leave 'wackamole' group although they will normally only 
   'leave'  implicitly on failure

As I see it this should work; wackamole will only ever see one valid member 
which it 'has' to assign to the single 'vip' address

Comments, please on sledgehammer/nut ratio viability and whether its been done 

David Turland

More information about the Spread-users mailing list