Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm here again! On my last questions here I was wondering how to sync data on EBS.

Ok. I've tested in first time the NFS, but everything goes extremely SLOW! And its a shared volume, if the master machine goes down, the others goes down too. Ok, I don't want NFS. Dicarted.

Now It's GlusterFS. I configured everything right, but I discovered that I can't use only two servers to sync files - I need a client too. Ok, I don't need this too, because like I said, if the masters servers goes down the clients will fail. Discarted.

Elastic Beanstalk on Amazon: I LOVED IT! REALLY! But don't have in Brazil and don't support spot instances... Discarted.

Rsync was my last option and works like I want, but I have a problem: if the files on client be modified? I host my images on S3 and my MySQL is on another cloud, so this is not the problem. I use Wordpress, so let's supose I'm on Webserver2 and I install/configure/update a plugin. The data will be save on Webserver2 but the rsync only run on Webserver1 to the others! So the configuration will be ignored on the others instances.

I can configure mod_proxy or whatever like this to server wp-admin to server 1. But if the server 1 goes down, no one can access the wp-admin...

So I have a big problem here. How I can solve this problem? I was thinking if I can host my PHP files on S3 and update/save/get automatically by some configuration on my machine. I really don't know what to do and I will be very happy if someone can help me.

I'm want to make this configuration because I have a really busy web blog, and I don't want to depend on only cloud for hanging all connections. How big sites works with this? Like Foursquare, Pinterest and Instagram?! Someone knows how they organize the structure?

Thank you! And sorry for my really poor english.

share|improve this question
    
With glusterfs it is my understanding that you can run a server and a client on the same machine so you could run the same on each server and they are replicates of each other (however I have no 1st hand experience with this). Are you running 2 servers for redundancy or because you get so much traffic that a single server can't handle it? –  Mxx Jul 31 '12 at 21:31
    
You ask parenthetically about infrastructure and engineering for Foursquare, Pinterest, and Instagram. I can only find MongoDB links about Foursquare but you get the idea. You might look more deeply into the Amazon AWS tutorials for your own use. –  khoxsey Jul 31 '12 at 22:53
    
@Mxx I'm using because I get so much traffic that a single server can't handle it... :-( –  Gabriel Araujo Aug 1 '12 at 3:08
add comment

1 Answer

If this is happening on Linux, why not write a bash script to recieve events from inotify (using inotify-tools) then rsync them around?

inotify-tools: https://github.com/rvoicilas/inotify-tools/wiki/

They actually have some examples on that page that do pretty much what I described.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.