3 ms·
Ask HN: How to automatically mirror your own sites?
As my business grows, I want to rely less on one hosting service. Ideally I want to set up a failover system for my VPS so that if one host goes down, the other seamlessly gets traffic redirected to it.
I'm not sure this is actually possible--even if I get servers to stay roughly in sync, what happens when the primary server goes down but the DNS servers pointing at it are fine?
The first problem is actually mirroring everything automatically. How can I keep copies of the files and database in sync across disparate hosting services?
The second problem is how I set up the DNS to fail over to the mirror site.
Is this feasible?
- rm-rf 17y agoOn Windows & Linux? Doubletake. (Or an OEM version - HP OpenView Storage Mirroring). We keep 25 million files in sync between two sites across a WAN. DNS? Load balancers do that automatically. They have features like GSLB that test each site and dish out 'A' records for the one that's up.
- marcamillion 17y agoBut doesn't the load balancer solution still restrict him to just the same host. Are there any solutions out there that would allow you to achieve the same effect, but say between two different providers. i.e. Rackspace goes down, all traffic is seamlessly redirected to Slicehost for example.
- rm-rf 17y agoYes. Load balancers have 'site level' load balancing, sometimes called 'Global Server Load Balancing' or something similar. They have the ability to direct users to a new site by changing the DNS 'A' record t IP's at the new site.