help with solution to keep 2 servers in sync
From: Pete K. (pkhalil_at_signaturesnetwork.com)
Date: 12/10/04
- Next message: J.O. Aho: "Re: help with solution to keep 2 servers in sync"
- Previous message: tiger web: "Re: Read stdin into an array?"
- Next in thread: J.O. Aho: "Re: help with solution to keep 2 servers in sync"
- Reply: J.O. Aho: "Re: help with solution to keep 2 servers in sync"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 10 Dec 2004 19:38:51 GMT
--------------------------------------------------------------------------------
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.
- Next message: J.O. Aho: "Re: help with solution to keep 2 servers in sync"
- Previous message: tiger web: "Re: Read stdin into an array?"
- Next in thread: J.O. Aho: "Re: help with solution to keep 2 servers in sync"
- Reply: J.O. Aho: "Re: help with solution to keep 2 servers in sync"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|