Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

share|improve this question

closed as not a real question by Sven, MadHatter, Khaled, Bryan, Alex Jan 16 '13 at 13:19

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Sorry, 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 Answer 1

up vote 0 down vote accepted

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:

  1. a script (actually, a Makefile) which copies the files (with rsync) from the directory where I store them to the N servers
  2. 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).

share|improve this answer
Does Linux not have a software load balancer? –  TomTom Jan 16 '13 at 10:23
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

Not the answer you're looking for? Browse other questions tagged or ask your own question.