help with solution to keep 2 servers in sync

This is a discussion on help with solution to keep 2 servers in sync within the Apache Web Server forums, part of the Web Server and Related Forums category; -------------------------------------------------------------------------------- I tend to feel this is the wrong solution to the problem at hand and would like to get input ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-10-2004
Pete K.
 
Posts: n/a
Default help with solution to keep 2 servers in sync


--------------------------------------------------------------------------------

I tend to feel this is the wrong solution to the problem at hand and would
like to get input from others before I continue heading down the path I was
told to take.

Setup
we have 1 webserver for our back end PHP processing
running apache 1.3.3
PHP 4.3.9
Mysql 4.0.20 Master (admin server) -> Master ->Slave (localhost) mysql setup

2 proxy servers running apache 2 and mod_proxy to cache static files

An admin server that is rsync'd to the production server every 5 min
(content manager's upload content through the main admin)

A staging server used to rsync files to the live site (used to put up code,
graphics ect...)

The goal is to add a second webserver to the setup and round-robin the load
on to the two boxes.

The Issue
Files need to stay in sync across the 2 webservers. This includes files that
may be uploaded by users through script, as well as files uploaded through
the staging server (rsync'd up, not really an issue) and files uploaded by
admins on the admin server. This also includes keeping config files, tmp
files, files moved or otherwise changed, sync'd between the 2 servers.
Using an NFS mount isn't an option for some reason.

The proposed solution
Go through all scripts, find any case that may some how change a file
weather it be a copy, delete, chmod, fwrite so on and so on, and log each
into a table with the file name and action to take. The server admin will
then have a script that runs every few seconds and checks the table,
performs an rsync based on the action then deletes the row.


There is a lot of code to go through, a lot of user interactivity that
touches a lot of files, and while I've written most of it, we do use third
party open source software such as php groupware and others that contain a
lot of code I have generally not even looked at.

I tend to think there is a better solution on the server side, but have a
pretty tight deadline to make all these changes, so I have not had much time
to research. I strongly feel that I'm being led down the wrong path, and
would like any suggestions or ideas that anyone can offer.


  #2 (permalink)  
Old 12-10-2004
Davide Bianchi
 
Posts: n/a
Default Re: help with solution to keep 2 servers in sync

On 2004-12-10, Pete K. <pkhalil@signaturesnetwork.com> wrote:
<zap>
> The Issue

<zap>

Has nothing to do with Apache or Configuration. Install a cluster.
Davide

--
Linux: The choice of a GNU generation
  #3 (permalink)  
Old 12-11-2004
HansH
 
Posts: n/a
Default Re: help with solution to keep 2 servers in sync


"Pete K." <pkhalil@signaturesnetwork.com> schreef in bericht
news:xUmud.31636$zx1.25022@newssvr13.news.prodigy. com...
> The goal is to add a second webserver to the setup and round-robin the

load
> on to the two boxes.
>
> The Issue
> Files need to stay in sync across the 2 webservers. This includes files

that
> may be uploaded by users through script, as well as files uploaded through
> the staging server (rsync'd up, not really an issue) and files uploaded by
> admins on the admin server. This also includes keeping config files, tmp
> files, files moved or otherwise changed, sync'd between the 2 servers.
> Using an NFS mount isn't an option for some reason.
>
> I tend to think there is a better solution on the server side, but have a
> pretty tight deadline to make all these changes, so I have not had much

time
> to research. I strongly feel that I'm being led down the wrong path, and
> would like any suggestions or ideas that anyone can offer.
>

AFAIK Apache does not have some master-slave-slave option alike MySQL.
Your question may run off topic, but hack how to know without asking?!

Assuming all servers are running *nix try the File Alteration Monitor to
wake up a script
http://packages.debian.org/stable/admin/fam "FAM monitors files and
directories, notifying interested applications of changes. This package
provides a server that can monitor a given list of files and notify
applications through a socket. If the imon pseudo device driver is loaded
into the kernel, it notifies FAM. Otherwise it has to poll the files'
status. FAM can also provide a RPC service for monitoring remote files (such
as on a mounted NFS filesystem). "

Some Perl modules that might be handy
http://search.cpan.org/~jglick/SGI-FAM-1.002/magicrcs
http://search.cpan.org/~jglick/SGI-F...lib/SGI/FAM.pm

And some nice reading to start with
http://www.tldp.org/linuxfocus/Engli...ticle199.shtml


HansH


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 02:57 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0