Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am setting up a webserver which is running Ubuntu 12.10. I use Canonical Landscape to manage the system and any future systems I may add. I am wondering about the best way to prevent website downtime due to hardware failure or system overheating.

I use a good 30minute+ backup system to ensure power failures less than 30 minutes don't affect my website (UPS Battery Backup) but what happens when the server itself fails. I've seen many setups for "cloud" configurations but none of it makes sense. I am new to server administration and so many terms are new.

I will be putting the MySQL database onto another server as my website grows to ensure speed. I am also hosting at home so having a redundant network is not possible. If my landline fails, the server goes down. However that doesn't bother me. Data centers can go offline due to network problems so i'm not worried about that.

Any software or hardware load distribution systems suggestions would help. Plus some simplified documentation so anything I wouldn't understand is explained or just using simplified terms.

Thanks in advance.

share|improve this question

migrated from serverfault.com Aug 8 '13 at 12:48

This question came from our site for professional system and network administrators.

3  
Please don't host anything important at home. It's simply not possible to do most of what you would need to do in a home setting. –  Michael Hampton Aug 8 '13 at 12:45
3  
I'd actually seriously consider getting a VPS here. Your home connection is unlikely to be anywhere near as fast as one in a datacenter. You could also have this in addition to your home system using round robin DNS. The power/reliability/cost benefits, will likely have you moving off your home connection in a year or two. –  Journeyman Geek Aug 8 '13 at 13:00
    
@JourneymanGeek is correct. A VPS from a reliable hosting company is a much better choice. Typically they have redundant power, internet, VM host, etc... webmasterfaqs.org/… –  Keltari Aug 8 '13 at 13:48

2 Answers 2

Include Varnish in your hosting stack. Varnish will serve as a cache and handle most requests for anonymous users. So even if your Apache server goes down varnish will continue to handle requests.

If you have a large traffic consider VPS' and several varnish heads in the front that talks to several apache servers.

share|improve this answer
    
Varnish does not help here. What about dynamic pages?! If the site is based on a CMS (or even something specially written) then a cache will do very little to ensure continuity. –  GeoSword Aug 9 '13 at 8:40
    
@GeoSword, varnish is only to serve statically cached pages. It will serve cached pages even if you have a CMS like Drupal running behind it. So all content that does not require user authentication can be served. However on login it passes on the control to the webserver + Drupal. –  sridhar pandurangiah Aug 13 '13 at 13:14

This is a very broad question, but here are some pointers. To protect against hardware failure you will want to investigate load balancing (I use ldirector) and/or Heart beat. It does mean you will need another more-or-less identical host to act as a stand-by.

While they are designed for different things, from a high availability stand point they can accomplish much the same. Heartbeat allows a pair of servers to monitor each other availability, and will switch services (Such as a web server) to which ever host continues to run.

Load balancing can achieve a similar setup by removing "dead" hosts from the pool. There's a good starter tutorial on heartbeat here: http://www.linuxjournal.com/article/5862 and this http://www.howtoforge.com/set-up-a-loadbalanced-ha-apache-cluster-ubuntu8.04-p3 deals with ldirectord on ubuntu (Although not the version you are using)

I use a good 30minute+ backup system to ensure power failures less than 30 minutes don't affect my website

Fine, but how long will it take to restore your backup?

I am also hosting at home so having a redundant network is not possible. If my landline fails, the server goes down. However that doesn't bother me. Data centers can go offline due to network problems so i'm not worried about that.

Of course, no where is bomb proof, but odds are that a DC's availability will be vastly better than that of a home broad band connection. DC normally have (or at least should have) Many redundant internet connections, backup power, flood protection and slew of other redundant systems to keep everything running.

If you want to improve the reliability of your site, getting a VPS or a rented server off one of the many providers out there, is probably your easiest option.

Good luck with your project.

share|improve this answer
    
Thanks for the suggestions. By 30minute+ backup system I forgot to mention that it was a UPS so that if the power failed the server stayed online like my modem router. I want to keep all my systems at home where possible as paying for a redundant server would be pointless if my hardware only goes down say once a month. I will be upgrading my aging server soon to either a top of the line Atom (low power consumption) or a lower end xeon and will easily be able to build two identical rackmount systems. I also don't want to downgrade from 12.10. Its stable and runs all the software I need. –  JWassall Aug 8 '13 at 11:54
    
Load balancing by itself doesn't protect against hardware failure, though it can protect against hardware failure in the load-balanced hosts (you still need to protect against failure of the load balancer, router, storage, and other relevant equipment). @JWassall, a low-end VPS isn't very expensive (similar in price to a home broadband connection), you could look into pay-as-you-go options like EC2, and either will give you the reliability you are looking for. An ISP DC will have on-call techs to deal with any problems more or less immediately, and many offer SLAs to suit different needs. –  Michael Kjörling Aug 8 '13 at 14:21

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.