I’m looking for an efficient way to keep multiple databases (on different servers) sync with a master database (also on a different server). Mind you I only need a one way sync (from master to all others).
As I was searching I came across multiple solutions.
replication: Which (from what I read) is unreliable, because if the slave servers or down temporarily or anything like that, they end up missing information. (Please correct me if I’m wrong)Injection: Which I also think is unreliable, not to mention a security problem because you’re directly communicating with the slave databases.
Since I didn’t like what I saw, I decided to make my own system (ultimately not liking it either) My system was to make a new table called ORDERS , and would basically hold values that could be translated as “Delete item with id 32 in table someTable” and on the slave side they would follow each of these instructions.
What do you think is the best way? The database is really small (with at most 3000 entries), so I want a really simple solution. Thanks
If you are using mysql, just use a master/slave setup. Not sure where you heard it’s unreliable if the slave goes down. One of the settings is how long of a replication log history to keep. If this is set to 7 days on the master, then a slave can go down and be offline for up to 7 days. When the slave starts back up, it starts reading from the replication log where it left off. It will take a while to catch up, but you won’t lose anything.
Companies have been using mysql replication for years with no problems. I have a master-master circular replication setup with slave off of each master. I’ve actually had a triple master setup during a migration with the servers on opposite side of the country.