Off Topic Apache Farm Question

Ask Bjørn Hansen ask at develooper.com
Mon Sep 24 09:00:01 UTC 2007


Woah - you could save a lot of disk I/O with csync2.  :-)

To the op:

MogileFS, Amazon S3 or homegrown replication with csync2 are usually  
my advice for "don't keep everything in one place".

Squid or varnish are good for making slow storage faster.

   - ask

-- 
http://develooper.com

On Sep 22, 2007, at 1:46 AM, marc at corky.net wrote:

> I do the same.  But instead of rsyncing every certain interval I  
> have the inotifywait utility watching the sync dirs for changes.   
> Once a change is detected (pretty much immediate) inotifywait exits  
> and the script enters the rsync loop which syncs the dirs to all the  
> nodes, when rsync is done the script is again blocked by inotify  
> until a change is detected.
>
> #!/bin/sh
>
> while true; do
>  inotifywait  -r /var/www/web1 -r /var/www/web2 -e modify -e attrib - 
> e close_write -e move -e create -e delete -qq
>
>  # Optionally add a small sleep here to let the change be completed  
> or tweak the notifywait like to be less trigger happy
>  sleep 5....
>
>  do_rsync
> done
>
> You'd have to have Linux for that.  On some other systems you can  
> use stuff like FAM.
>
> Marc
>
> Brian Moon wrote:
>> Dan Miller wrote:
>>> What are other people using in an environment where they need to  
>>> share diskspace across a web farm. Thanks
>>
>> We have some servers that are internal use only that are NFS  
>> mounted and then the NFS server is rsync'd with the public facing  
>> servers every 2 minutes.
>>


More information about the memcached mailing list