Hi, this is what i am trying to do:
1) I have 2 directadmin servers A and B, both running mySQL 5.0+
2) A is the master server, where i have most of my websites and sql data bases running on it. Server hostname is A.com, with DNS server ns.A.com
3) B is the back up server such that when A fails, some websites that was on A will be redirected to B. Server hostname is B.com, with dns server ns.B.com
4) Server A and B are on different networks
This is my setup. Lets assume that the website which i would like to host is www.domain.com
In the domain name records @ the registrar, i'll have:
primary dns : ns.A.com
secondary dns: ns.B.com
In ns.A.com, I have records for domain.com that points to the server A
in ns.B.com, i have records for domain.com that points to the server B.
In this way, when server A dies (which means ns.A.com dies also), users who visit www.domain.com will be directed to server B because when they lookup the ip address of domain.com, it will probe from ns.B.com as ns.A.com is not responding. Is this idea flawed? I assume that there is no caching of dns resolution in the isps.
Next.. mySQL:
I want the data base of the website in A to be replicated over to B instantaneously. I know this can be done by master-slave mySQL replication. However, if server A dies, assuming that traffic is successfully directed to B, and there are changes made to the database in B (which is supposedly exactly the same as A just before A dies), i want this change to be replicated back to A when A comes alive again. Will master-master mySQL replication achieve this automatically?
Last... data files:
i'm using rsync between both servers. From A to B at time intervals. However, is there a way which i can synchronize both ways?
Please let me know of this model and if there are flaws to it. If possible, please point out to me the issues and ways to resolve it. Thank you very much.
1) I have 2 directadmin servers A and B, both running mySQL 5.0+
2) A is the master server, where i have most of my websites and sql data bases running on it. Server hostname is A.com, with DNS server ns.A.com
3) B is the back up server such that when A fails, some websites that was on A will be redirected to B. Server hostname is B.com, with dns server ns.B.com
4) Server A and B are on different networks
This is my setup. Lets assume that the website which i would like to host is www.domain.com
In the domain name records @ the registrar, i'll have:
primary dns : ns.A.com
secondary dns: ns.B.com
In ns.A.com, I have records for domain.com that points to the server A
in ns.B.com, i have records for domain.com that points to the server B.
In this way, when server A dies (which means ns.A.com dies also), users who visit www.domain.com will be directed to server B because when they lookup the ip address of domain.com, it will probe from ns.B.com as ns.A.com is not responding. Is this idea flawed? I assume that there is no caching of dns resolution in the isps.
Next.. mySQL:
I want the data base of the website in A to be replicated over to B instantaneously. I know this can be done by master-slave mySQL replication. However, if server A dies, assuming that traffic is successfully directed to B, and there are changes made to the database in B (which is supposedly exactly the same as A just before A dies), i want this change to be replicated back to A when A comes alive again. Will master-master mySQL replication achieve this automatically?
Last... data files:
i'm using rsync between both servers. From A to B at time intervals. However, is there a way which i can synchronize both ways?
Please let me know of this model and if there are flaws to it. If possible, please point out to me the issues and ways to resolve it. Thank you very much.