Hi, Rod. Thanks for your question.
You cannot use a traditional RAID setup, since this would effective
combine the two computer's hard disks to make one, and only one
computer could use this hard disk at a time.
It is possible to sync the data between the two machines. The big
problem with this, however, is the databases. If the database on one
machine is updated, it cannot simply be copied over the one in the
second machine because this would destroy any changes that have been
made to the second machine's copy of the database, and the reverse is
also true.
However, it is possible - but a bit complex - to use two machines
simultaneously with their own copy of the same database, in such a way
as to allow you to take one down to carry out testing. To solve this
problem, you would need to implement something called multimaster
replication on your two servers. This allows changes to be made to
both databases and they will appear on the other server immediately.
You do not say what database you are using, so I have provided some
solutions for the most popular database systems, as well as a few that
should work no matter what database you use.
Some solutions include:
- PeerFS (www.radiantdata.com) will automatically sync any changes on
one machine to the other in real time. Programs on both machines will
have access to the data, and if one machine was taken down for testing
or maintenance, the other should continue regardless.
- If you are using PostgreSQL, the PGCluster program
(http://pgcluster.projects.postgresql.org/) may be of use, as it
allows the syncing of data across multiple databases in real-time.
- Another option for PostgreSQL is http://dbbalancer.sourceforge.net/,
although this code is alpha-quality.
- Setting up MySQL to mirror the data between the two servers. There
is a tutorial available at
http://dev.mysql.com/tech-resources/articles/mysql-cluster-for-two-servers.html,
but it does require a third server.
- Setting up a shared network filesystem which the database would be
stored on. One such option is drdb, available from
http://www.drbd.org/.
- The mirroring functionality required is built into Oracle.
Probably better solutions to having two servers mirroring each others content are:
- Use one server as a web server, serving HTTP traffic, and the other
as a database server.
This would allow you to make use of both servers at once, one for
serving requests for information from the database, the other for
serving requests from the web. This would eliminate any problems with
synchronising the databases, and is a fairly common way to use
multiple machines. However, if your database is not used much, this
may be a waste of resources.
You could use the secondary database server as a test server when
required by copying the database over to the primary server and using
that as both the database and web server while testing is happening,
and copy it back to the secondary server when testing is complete.
- Use both servers as web servers, but put the database on the most
powerful of the two machines.
This would send HTTP requests to both machines, but only the most
powerful of them would run the database. Under this setup, the load is
split, and if you need to take a server offline for testing, you
should be able to disconnect the pure webserver without affecting the
other server.
It's also worth mentioning that if you need another server just for
testing, it may be cheaper to rent one - this way you don't have to
buy an entirely new server simple to check everything works okay.
As to your last question, it shouldn't matter as long as the software
they write is compatible with both machines. Most software written for
older versions of a library will usually be compatible with a newer
version of that library. The best bet is probably to ask him to write
code that is compatible with both machines, and if a newer version of
a library is absolutely essential, it shouldn't be a huge undertaking
to upgrade one library on both machines.
I hope this helps. Please do not hesitate to request a clarification
if you have any questions.
--wildeeo |