Infrastructure
I have two database servers, running on two different boxes. One works as a primary database for my web application and other works as secondary database. Secondary data base is updated by replication facility in mysql server. Primary database server works as master and secondary database server works as client.
Requirement
currently, my web application only interact with primary database. I want to add a functionality that will enable the application to use secondary database server if primary is down by some reason. Now, I need some tool/program to sync the changes made in secondary database to the primary database when it is up.
Basically I am looking for a feature that will enable my databases to be in sync all the time without fail. Please suggest me, how can I achieve this?
Thanks,
Vijay