Networking Forums

Networking Forums > Computer Networking > Linux Networking > help with solution to keep 2 servers in sync

Reply
Thread Tools Display Modes

help with solution to keep 2 servers in sync

 
 
Pete K.
Guest
Posts: n/a

 
      12-10-2004, 06:39 PM

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

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.

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.


 
Reply With Quote
 
 
 
 
Andrew Schulman
Guest
Posts: n/a

 
      12-11-2004, 04:59 AM
> 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.
>
> 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.


Geez, that sounds like a nightmare, and fragile too. What about using
Unison? http://www.cis.upenn.edu/~bcpierce/unison/

See the FAQ, "What are the differences between Unison and rsync?"

--
To reply by email, replace "deadspam.com" by "alumni.utexas.net"
 
Reply With Quote
Reply

Thread Tools
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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple solution to sync UIDs on NFS? Andrew Woodward Linux Networking 4 07-14-2008 12:10 AM
Eclipse - Do they have Time Servers customers can sync their PCs with? Java Jive Broadband 19 01-30-2006 05:32 PM
No network Connectivity between 2 servers (windows 2003 servers) ImraneA Windows Networking 1 11-26-2004 11:18 AM
Scripting solution needed for DHCP and trusted PDC/DHCP servers. Scott Cooper Windows Networking 2 07-15-2004 11:05 PM
Smtp and news servers temporary solution? FJDx Broadband 4 02-28-2004 03:20 PM



1 2 3 4 5 6 7 8 9 10 11