#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    3
    Rep Power
    0

    Question


    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.
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    3
    Rep Power
    0

    Smile Database Replication solution found


    A colleague has pointed out that there is a PSQL replication server available from http://www.pgsql.com/download/

IMN logo majestic logo threadwatch logo seochat tools logo