I am looking to set up a redundant network that uses a load balancing solution to redirect traffic between two servers. The load balancer I will use is HaProxy.
Example: Traffic -> Haproxy -> Server1 or Server2
Now, both Server1 and Server2 will have litespeed and MySQL (And various other components but they don't require redundancy)
so should Server1 or Server2 be cut out of the equation due to high load, downtime or attack there will be a server remaining that can handle all incoming traffic.
That is all fine, I was just explaining the scenario but what I need to know to do is all files updated on Server 1 need to be synchronised to Server 2 and vice-versa. A small delay would be acceptable for files, for example 2-5 minutes whereas database changes made on either Server1 or Server2 need to be replicated almost instantly.
So is this possible? I don't want to spend too much money on software etc. P.S the two servers are half way across the globe from eachother so I am not expecting instantaneous replication just as quick as possible.
Thanks in advance for you help.