
February 13th, 2001, 04:39 AM
|
|
Junior Member
|
|
Join Date: Oct 2000
Posts: 3
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Simple question: I have set up a small web farm consisting of two Linux servers serving JSP content. There is a load-balancing traffic manager between the Internet and the servers. The servers access a small local database of usernames, passwords and preferences. How do I ensure that new registrations get into both copies of the database?
Ideas that have occurred to me so far include
a. A script that runs every five minutes to export all rows of the users table to CSV format, and to import the other server's export file. Not very scaleable and it would make it difficult to delete an account.
b. Stored trigger that replicates updates as and when they happen. How does one do this? Can the action be deferred if the mirror database happens to be down?
c. Modify the registration script to explicitly update both copies of the database. Laborious and again not really scaleable.
d. Use a master database, possibly on a third server, through which to funnel all updates.
Your thoughts would be appreciated.
|