I been looking for solution to a bit complicated issue. I have F(ast) server and S(low) server, both serve mysql and www. I would like to have a (not in real time) copy of F server on my S server, in case of F downtime, the main traffic is pushed to S server, but while that is happening all edit/inserts are happening on S database, as soon as F come back to life it should sync. I tried: - mysql master-slave its great for small downtimes when visibility is important but writing to slave is a no-go. - mysql master-master in theory it was working fine until the switch started and some traffic went to S and some to F, then it just desync - galera/percona cluster - in theory this is even better that master-master with better support etc, until one caviot - the writing need to be done on all databases which makes F(ast) server while writing as slow or slower than S(low) one. - proxysql very good I tried it to be the director with master-master but it end up with same desync issue. I know that Postgres would fit here because of even better replication abilities but I'm limited to mysql/mariadb because of the software that is using it (asume its wordpress for the sake). For context F(ast) server is cheaper, 10-15x faster than the slow one but has SLA ~ 95% (which gives less than 20 days offline, which in worst case translate to month of not working mon-fri), and the S(low) one has SLA 99,99%. I'm thinking to give master-master one more go (maybe it was bad configured) because the prefix and incrementation setting should resolve issues with conflicting id. What are your stories about successfully using master-master in production ? Do anything comes to mind with issue like this ? Any ideas to try out ?
Since you said the fast server is cheaper and faster I would say just use it and ditch the slow server. You could always use the slow one to dump backup, mysql and other things, if you feel you still need it for any reasons.
as easy as the idea sound, 20 days of being offline (which most of the time is) is absurd for anything that pretend to be public access. That option is out of question I understand that this is not a google page that lose millions of dolars each second its offline, not even speaking about 20days being offline but idea. I understand that budget is non-existing, but I was hoping for some discussion or ideas ;-)