1

I would like to create a fail-over web server using one physical box and 2 virtual instances. What I am aiming for is the host OS monitors performance of a web server running in a virtual machine (ie virtualbox), and if it finds that the web server is non responsive, it will start the backup virtual instance of the site and reset the first instance. I am wondering if this is possible and how one would go about setting up such a system?

Thanks.

  • knowing which webserver you are running would help. – TheCleaner Jun 7 '13 at 17:48
  • ...and operating system for that matter, though it's not going to change my answer :) – voretaq7 Jun 7 '13 at 17:55
  • I was thinking Ubuntu Server as the OS and Apache or Nginx for the webserver (but I am open to other suggestions). – user5013 Jun 7 '13 at 18:27
4

You can't.
Redundancy requires two physical machines.

The best you can do with one physical machine is set up a virtual environment to simulate redundancy (for the purposes of testing and debugging your failover process).
You should not rely on it as a production solution, because you still have the same single point of failure you would have started with (the single physical machine's hardware).

  • That is true, it wouldn't be only useful as a testing environment. But I would still be interested in how one would go about setting it up. – user5013 Jun 7 '13 at 18:25
  • it would only be useful as a testing environment. In terms of setting it up, you set it up the same way you would for individual physical systems ("Setting up redundancy 101" is way out of scope for Server Fault -- if you have a specific question about an implementation you can certainly ask it, but we can't hand you an architecture since we don't know your requirements) – voretaq7 Jun 7 '13 at 18:38
0

What are you trying to protect against? Obviously hardware failure is going to affect both systems. Think through what is redundant and what is not and whether that meets your needs.

Virtual machines can be quite good for testing redundant server configurations though.

You need to decide how you are going to perform a switch between your machines. Are you going to move the IP of hte live server between systems? Look at heartbeat for that, but also look carefully at what your virtualisation system supports, and at what point you need to be issuing the required commands.

Alternatively, it may be suitable to have a load balancer which switches out any failed machine. If you can tolerate a bit of downtime, you could even opt for a DNS based switchover (up to 15 mins with a TTL of 900, which is the lowest you can count on being honoured).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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