Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a java REST service which is very CPU intensive. The service serves a website.

I would like to host the service on my local machine which has 8 core 16GB RAM, SSD as the main storage and high speed internet connection with static IP.

But, I also like to have amazon EC2 as backup, in case my local machine is down for some reason. This is for redundancy sake.

Following is my plan:

  1. The service will be by default serve from my local machine.

  2. In case the local machine instance is down, a high performance amazon EC2 instance will spin up and start serving the rest URL. And, when the local machine is back online, the ec2 could be stopped automatically or manually.

The problem:

  1. How to automatically start amazon ec2 instance only when my local instance is down.

  2. How to automatically route the service request from the website to the healthy instance (my local machine or amazon ec2).

  3. How to securely host the service locally which could serve the website. I understand, my ISP doesn't block inbound 8080 port. Should I try oracle VM image or something similar.

Any other suggestions to my plan are welcome. I want to reduce the cost.

share|improve this question
    
If it's mission critical, host it somewhere a mission critical server should be hosted - a datacenter, not at home. If it's not mission critical, you don't need something complicated like this - chances are it'll break more than it fixes. –  ceejayoz Jan 2 at 18:42
    
If there is no easy way to accomplish above, I will host it in a data-center and spend thousands of dollars. But before that I thought no harm in asking. –  Watt Jan 2 at 18:43
    
You'll spend thousands of dollars worth of time trying to engineer this together. Single-server colocation can be had pretty cheaply these days. –  ceejayoz Jan 2 at 18:51
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.