5

Edit: I asked this question 3 or 4 years ago when I was new to web-development, the question looks a bit stupid to me today. I wanted to create a server setup of my own without relying on other hosting providers. I wanted to delete this question, but it have some nice answers, so I'm leaving it.

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 ?

3
  • 2
    I seek not to know all the answers but to understand the questions. ;) Oct 27, 2012 at 2:42
  • You can start by searching for "web farm". Oct 27, 2012 at 7:48
  • @TulainsCórdova , I asked this question 4 years ago, when I was new to web development, today it looks very stupid to me. :)
    – Bangash
    May 10, 2016 at 3:43

3 Answers 3

3

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

1

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.

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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