# Automatic data synchronization with moving master



## pbd (Aug 20, 2009)

Hi,

we have a several web servers in cluster. Users upload their data using ftp and scp to the master, from which it is distributed to slaves.

The difficult part comes when master goes down and some slave takes his role. Upload of new data, must still work and so the distribution from new master to remaining slaves.

We are using bunch of scripts and rsync to resolve whether or not should some node distribute its data to others, but it is far from ideal, so I would like to ask what solutions do you prefer, if any.

Thanks.


----------



## SirDice (Aug 20, 2009)

Use a SAN or a NAS to store the data. Mount that on all the servers. No more need to distribute anything.


----------



## pbd (Aug 20, 2009)

SirDice said:
			
		

> Use a SAN or a NAS to store the data. Mount that on all the servers. No more need to distribute anything.



Thanks, but can NAS or SAN function with no single point of failure? So that any node can go down and up data can be still read and written as long as at least one node remains running? I tried to UTFG, but I am confused, sorry.


----------



## gordon@ (Aug 21, 2009)

Use a virtual IP that is always associated with the master (whoever has that role). You could use VRRP or something like it to have it automatically failover. Then, for your hosts, you just have them do rsync from that IP address to themselves, with the exception of the guy that is the master.


----------

