Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I want to deploy my website to multiple physical servers.

Is there possible methods to save files and setting (and also the user input), on all physical servers, so that servers do the following jobs:

  1. Servers used as a network, speeding up the process giving a robust thing to the end user.
  2. Data to be stored on all the servers' hard drivers, and
  3. Every server have the internet connection from different provider, so for example
    1. if any of the internet providers gets down, or
    2. there occur any hardware or power failure,

the website still runs, without a break and without any data loss.

Does anyone know about some online course or some comprehensive tutorials about this topic ?

share|improve this question
    
I seek not to know all the answers but to understand the questions. ;) –  user61852 Oct 27 '12 at 2:42
    
You can start by searching for "web farm". –  System Down Oct 27 '12 at 7:48

3 Answers 3

up vote 4 down vote accepted

Right Thinking.

Every server have the internet connection from different provider, so for example a. if any of the internet providers gets down, or b. there occur any hardware or power failure, the website still runs, without a break and without any data loss.

For that, if you rely on multiple hosting services, then it will be hard to maintain for you when your Website grows.

For your purpose, you should take hosting services from content delivery network (CDN) based companies.

A content delivery network (CDN) is a large distributed system of servers deployed in multiple data centers in the Internet. The goal of a CDN is to serve content to end-users with high availability and high performance. CDNs serve a large fraction of the Internet content today, including web objects (text, graphics, URLs and scripts), downloadable objects (media files, software, documents), applications (e-commerce, portals), live streaming media, on-demand streaming media, and social networks. -- From Wikipedia

Following resources may help you

share|improve this answer

If you're looking for performance gains, it's an entirely different subject than high availability or fault tolerance. I'll assume you're looking for the latter only.

What you can do is have 2 (or more) servers. 1 active, and the other for fallback. For example, the main server could run, do everything it needs to do, while the other server keeps synchronizing with it (possibly over NFS or SSH), and testing it with CURL to make sure it's alive every few minutes (or seconds).

If and when it detects that the main server isn't responding, it launches the web server software on its own HD, along with all the so-far-synchronized data, effectively declaring itself as the active server.

If and when the main server, which previously went down, goes up again, the first thing it does is check if the other server is now the active one (or in the process of becoming one). If it is, then it effectively declares itself as the secondary one. Otherwise, it simply boots its own web server again.

share|improve this answer

A CDN may do what you want if your website is caching friendly (a lot of repeated reads).

However if it is not then I'd set it up like this multiple internet connections -> Firewall -> Router -> Load balancer -> Multiple web servers -> Shared SAN, this way all the web servers are saving to the same location. If you want to distribute your servers over a large area you have to be aware that there will be a latency of some sort between the servers and so will not match perfectly.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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