Jump to content

Synchronising multiple servers...


tekknoir

Recommended Posts

Hello,

 

I am currently working on developing a CRM system, one of the features requested was a system which allows users to manage their own data online, which has been implemented.

 

However, my employer are reluctant to keep all of their marketing data on a web-facing server, because obviously if the server was hacked, it'd be pretty bad.

 

So, I have a second server in the office, which has permissions enabling it to access the database server on the website server, and a copy of the database structure.

 

My question is to do with synchronising data between the two servers.

 

The problem is not the issue of transporting data between the servers; the internal database server has permissions enabling it to connect to the remote server.  The issue is with reconciling the data..

 

Because the local server can access the database on the remote server (But not the other way around), it's fairly easy for updates made locally to be propagated to the new server, but less so for changes made by the customer website being propagated back to the internal system.

 

I think this can be circumvented by making both servers get their time from the same NTP server, and using timestamps on records to reconcile disparities, but I'm not sure what's the best way to synchronise the data, the current list of options I've come up with for it are:

  • Keep a second table on the local server which mirrors exactly the table on the remote server, which is re-downloaded maybe 2 or 3 times a day
  • As above, but without the cron job, and with a manual reconciliation button instead
  • Have the local server check if the record exists on the remote server, and if so reconcile both before the record is loaded, and after it is saved

 

The third option entails quite a bit of traffic, in a sustained trickle, while the others are more bursts of high traffic a couple of times a day (It's likely to be fairly slow to be honest, taking into consideration the volume of data and the speed of the connection between the servers, maybe about 20 minutes to transfer all the data over).

 

If anyone has any advice on this topic, I would love to hear it ^_^

 

Currently I'm thinking option 3 might be the cleanest way to go..

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.