views:

116

answers:

5

Hi everybody,

Let's say that we are about to build an web application where high availability is top focus. Our customers are companies, so downtime are equal to loss of revenue for everyone involved.

To sum it up, we need to be online at all times to keep everyone happy. So, from a very basic perspective, what techniques should we be looking at to do this?

We have pretty much no preferences besides that we will be using PHP to keep developing speed high, so we're totally open for new platforms of data storage and what else is out there to make it happen.

Your answer is very appreciated! Thanks a lot!

+1  A: 

Lots of redundancy, all the way to multiple data centres if you can never afford to be down.

Roger
+2  A: 

There are a few ways to address this question depending on a lot of variables:

  • go with a hosted solution
  • deploy virtual machines to have redundancy
  • use load balancing
  • raid array

All those combinations can help you.

If you decided to go with a hosted solution you would still want to do some of your own backups, in case your host goes down and you need to recover. If you deployed virtual machines you could also enforce some load balancing and have virtual machines prepared in case components go down.

Chris
+3  A: 

You need to consider both hardware and software for this.

Regarding hardware, your best bet is probably to pick a hosting provider with the necessary experience, like Rackspace (I have made good personal experiences with them, but there are lots of others). This will not come cheap. You will need fully redundant hardware to survive the failure of any one component - multiple servers (at least two), each with multiple disks, network cards, fans, power supplies - you get the picture.

Regarding the software - make sure you build it with scalability in mind. If it's your run-of-the-mill web application, using the MVC paradigm and keeping the separation clean will go a long way in ensuring that you can scale your application across the multiple servers you will need to run.

The hardest part is usually the database, since you can't just run two. So look into a master-slave setup with automatic failover, or even a cluster.

A number of books are available for this topic, here's just one of them. Good luck!

Thilo
Oh, and a fast-growing alternative to managing individual servers for availability is using cloud hosting. Certainly worth looking into.
Thilo
Further considerations with the software - keeping track of client state when using multiple servers. There are lots of options there, each with pros and cons, so a good approach is to consider what you wish to provide to the end user, and how much time / money you want to spend to get it there. 100% uptime is MUCH more expensive than 99.9%.
mwalker
Hi Thilo, thanks a lot for your answer! Very informative.How would a server crash be handled in the event of one server going offline? How can we "redirect" the visitor to the 2nd one?
Industrial
A load balancer will do that for you automatically. Unfortunately that's an expensive piece of hardware, and it raises the issue of user session as mwalker mentioned. See for example http://en.wikipedia.org/wiki/Load_balancing_%28computing%29
Thilo
+1  A: 

You can also have a look at the different cloud services such as Amazon EC2 and Rackspace Cloud. You might then be able to pay only for the exact computing power you need ...

Also see:

http://www.2mhost.com/mission-critical-web-hosting.html

http://www.ihostxtremes.com/

http://www.netlocations.com/

http://www.mewebhost.com/

Greg McNulty
A: 

I suggest developing your application on Microsoft Azure Platform, this way all the stuff beyond the application level will be handle by professionals which will grantee you 99.9% uptime and reliability. And yes, it supports PHP.

http://www.microsoft.com/windowsazure/

alt text

Koistya Navin
That's nonsense, like saying a certain make and model of car will never break down. Beware of unsinkable ships!
mwalker
Advertising does not an answer make! Besides, since when did Microsoft ever play well in the open source world? Yeah, it may support PHP, so what. My grandma could run a marathon, it doesn't mean I would bet on her winning; professional or not.
cdburgess
mwalker, can you tell me another alternative which will host your web application in different data-centers, so if one will be physically destroyed your application will still be up and running? BTW, Amazon EC2 is not an option since it is still requires some amount of administration work from the application owner which Azure platform handles automatically.
Koistya Navin