I'm planning on replicating a web server for high availability purposes. The server is running as a Ubuntu 15.04 virtual machine in Hyper-V and has MariaDB 10.0, Apache 2.4 and PHP-FPM 5.6 installed.
The 2nd virtual machine will start as a direct copy of this virtual machine but will be located in the United States. The 1st virtual machine is located in Europe. (latency will be about 80-120 ms)
I'd like to keep the servers in synch so they can both serve the same content to my clients and so that clients will use the closest server (for this I will use Route 53)
It's important that the data exchange between the servers is secure, to protect contact details and other information in the database and to prevent altering of the files in the /var/www directory.
I've considered using the following options for this:
- openvpn
- SSH tunnel
SSL(TLS)
- My question is which is the most reliable, quickest(latency, throughput) and safest method? Easy maintenance is also nice to have ;)
I've considered using SSH, for both the database and file replication. However I'm not sure which application to use for the file replication part.
- How should I setup the replication of the files and which application should I use for this?
SSL could be used for the database replication, but it requires the generation of certificates which need to be replaced every now and then and which may cost money.
My final option is to use openvpn, but I'm not sure if I can set this up as an additional network instead of routing all my traffic over it. This method also seems to require the generation of certificate files..
- I'd like to have the ability to add extra servers to the replication process at a later moment, possibly windows servers.