The best way to sync 2 identical centos servers in real time

failoverhigh-availabilitymirroringrealtimersync

I am operating a centos linux server(A) and I want to create a realtime backup server(B) so whenever server A goes down server B(after the failover kicks in) will take over.
I already solved the failover thing(tip: I used Cloudflare) and I am looking for a solution to "mirror" my server A files and databases to server B.

I used rsync and mysqldump through crons but its not realtime plus its resource intensive because it transfer all files and database content every time.

Best Answer

It depends on your particular requirements. For example, if the application isn't resource intensive you could perhaps go virtual and use VMWare Fault Tolerance. If resource intensive and/or physical you should probably look at DRBD.

Hope this helps.