[Cialug] instant replication with rsync

Matthew Nuzum matthew.nuzum at canonical.com
Tue Jan 13 11:56:04 CST 2009


On Tue, Jan 13, 2009 at 11:46 AM, Jeffrey Ollie <jeff at ocjtech.us> wrote:
> On Tue, Jan 13, 2009 at 11:37 AM, Matthew Nuzum <newz at bearfruit.org> wrote:
>> Is there a way to use rsync (or a similar tool) to get near instant replication?
>>
>> Scenario, you have a website that allows users to upload images. Files
>> are uploaded several times per day at unpredictable intervals. You
>> want the images to appear instantly regardless of which webserver they
>> were uploaded on.
>>
>> Setting rsync to run at 1min intervals would not do this because if
>> you upload an image you want to see it right away. Also, on a busy day
>> there may be 10 - 20 images uploaded. If you have multiple servers
>> running rsync at one min intervals it would be a bit wasteful.
>
> I would either push the images from the upload server to the rest or I
> would trigger a pull using some lightweight mechanism like an xml-rpc
> call or something like that.

Yes, that seems like a good way. I'm a web programmer so I could
imagine a system where an event occurs that I can trap and run a
processes on. onchange="..." or ondelete="..." Is there a way to cause
things to happen when certain events occur? I seem to remember a
feature from SGI that notified applications when the fs changed. That
was years ago and seems like there'd be lots of good uses for that, so
certainly it's common now, right?

-- 
Matthew Nuzum
newz2000 on freenode, skype, linkedin, identi.ca and twitter


More information about the Cialug mailing list