I have a website hosted on a VPS, But now i have a problem. My website, downed several times in last month and i change my service but still i have the same problems... I want to do something, i want, my site's data and database store on 3 different server simultaneously and when one of them goes down, my site loads from another... i'm using Linux servers. How i can do this? what i need to know? i don't have any information about this. what software's and techniques i need to use. please help me in easiest way. thanks in advance
Asked
Active
Viewed 77 times
0
-
2Sorry, but let's get drastic there. It is not your VPS failing? That would be unacceptable uptime. It is your site failing. What about instead of throwing hardware to bad sofware, you fix the site? The idea of a website process dying "several times in a month" would make my programmer pride cringe. And for a server - regardless how cheap - that is not acceptable either. – TomTom Jan 16 '13 at 10:24
1 Answers
0
There are many solutions, ranging from the simple to the ultra-complicated and difficult. For a simple static Web site (only files to serve), I use:
- a script (actually, a Makefile) which copies the files (with rsync) from the directory where I store them to the N servers
- Several address (A and AAAA) records for the same name in the DNS
This is not load-balancing (the DNS does not do it) but it spreads the load on the machines. Also, with this setup, the failover is manual (change the DNS records).
In your case, I note that you do not have static files (the simplest case) but a database. But could it be possible to export from the database to static files? It makes the configuration of a reliable and redundant Web site much simpler (of course, you'll lose some agility, since you'll have one more step before publishing).

bortzmeyer
- 3,941
- 1
- 21
- 24
-
-
TomTom : the great thing about the solution I describe is that there is no SPOF. A load balancer is itself a SPOF, which may fail. Also, some load balancers are broken with some protocols, like IPv6. – bortzmeyer Jan 16 '13 at 10:26
-
Not sure. Windows has NLB which is NOT a SPOF as it runs distributed on all nodes it is installed. – TomTom Jan 16 '13 at 10:27