How to best set-up a small local 'sync' network next to the live
network?
Olaf Greve
o.greve at axis.nl
Wed Oct 5 02:39:14 PDT 2005
Hi,
At present I'm in the last stages of configuring my new (primary) web
server. As soon as I'm done with it, I want to place the machine at the
server farm, connect it to the present live server, take the later one
off-line for an hour or so, hook it up via local network to the new
primary server, rsync the necessary files, and update the MySQL DB.
Once that's done, I'll simply swap the external (i.e. "world") IP
addresses of both machines, and then the new primary server should be
pretty much up and running.
Now, what I'd like to do, is: make the current live server a fall-back
machine (connected to the outside world, but normally never mapped via
DNS entries, unless the primary server goes down, and I assign the IP
address of the live machine to the fall-back machine).
What I'd like to do as a strategy is the following:
Primary server:
- Runs FreeBSD 5.4-Release AMD64
- Connected to outside world via NIC 1 @ a real IP address; say
123.45.67.89, publicly available as webserver incl. DNS mappings, etc.
- Connected via a cross-wire cable to fall-back machine via NIC 2 ;
using address 192.168.1.1
Fall-back server:
- Runs FreeBSD 5.2.1-Release i386
- Connected to outside world via NIC 1 @ a real IP address; say
123.45.67.88, "privately" available by IP address only (mainly for SSH
access, serves as fall-back and staging machine)
- Connected via a cross-wire cable to primary server machine via NIC 2 ;
using address 192.168.1.2
Now, the machines are (obviously) not the same hardware wise, nor OS
wise. I may (or may not) decide to install FreeBSD 5.4-release i386 on
the fall-back server, or I may just leave that "as is".
The things I'm wondering about are the following:
-How can I best set-up such a dual network configuration, such that one
network will not interfere with the other?
-Can I somehow 'force' the machines to automatically interpret anything
in the 192.168.1.x range to be local, and hence automatically use NIC 2,
instead of using the NIC 1 adapter (which handles my outside world traffic)?
-Is it sufficient to set-up the Rsync daemon on the primary machine to
only allow connections from 192.168.1.2, and to run as root, such that I
can easily use the cross-wire as a kind of direct tunnel to perform the
syncing?
-What is the nicest MySQL replication mechanism? Presently I use a
mechanism that dumps the MySQL DB instances, and will then push them
over an SSH tunnel to the fall-back machine, directly loading them into
the MySQL DB on that machine. Is MySQL's master-slave syncing perhaps a
better choice?
Cheers, and thank in advance for any and all replies!
Olafo
More information about the freebsd-amd64
mailing list