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.

Let's say I have an EC2 instance. If it fails - all data is lost (we do not talk about EBS). The question if amazon will recreate instance in case of fail? or my website will be down until I enter management console and rerun it?


Probably I was not clear with my question. The problem is not in data lost. Will my server get back online, if instance was terminated by some kind of fail?

We have some answers here. Thank you

So if instance is down because of a fault I have to start in manually. The question is if amazon will send me a message about the problem? Imagine I am on vacation, instance fail and I have no idea about it. So web site stays down for all these days???

thank you

share|improve this question

3 Answers 3

up vote 1 down vote accepted

Amazon will usually try to recover the instance (if it is their problem), but in my experience it is quicker to just terminate it and launch a new one if it comes down to that. That said, in two years, I have only had instances 'fail' twice. Amazon will not restart an instance that gets locked up (e.g. excessive swapping, etc). You can use autoscaling to maintain a constant number of instances (if one fails it will automatically start up a new one for you).

You should not have any data requiring persistence on an instance-store volume. With EBS volumes (even root volumes) they can be configured to persist after the instance has been terminated, and will prevent you from losing any data. (Also, the ability to snapshot EBS volumes is extremely helpful).

I might suggest that a significantly overbid persistent spot instance request would restart a failed instance (but Amazon has less support for spot instances from what I can tell - they are meant to be disposable). This approach will not help with a 'frozen' instance.

Depending on what you are serving, you might consider two smaller instances that monitor and loadbalance each other - this greatly decreases the probability that both go down, but should still be used in conjunction with something such as autoscaling. Cloudwatch will help you to monitor if an instance is 'frozen' (I believe 5 minute granularity is free); you probably also want some sort of external monitoring (Pingdom/UploadRobot) just in case.

share|improve this answer
    
If you are just looking for a notification when your instance goes down, use a monitoring service; Amazon will only notify you if a) they are unable to recover an instance where the failure was their fault; or b) you have cloudwatch alerts enabled. If the instance crashes, freezes, etc you will get no notification, and cannot rely on an automatic restart (some instances were frozen for days when there was a problem with EBS) –  cyberx86 Jul 7 '11 at 3:11

No, you should design your instances in such a way that any persistent data is stored outside the instance. You should plan to have instances fail.

If you want persistence in your instance, you should consider a VPS provider such as Linode or Slicehost.

share|improve this answer
    
+1. Use S3/EBS if you want to persist data across instances. –  BenGC Jul 7 '11 at 1:04
    
I rephrase the question, thank you –  user349302 Jul 7 '11 at 1:35

To answer the question you actually asked: yes, if an EC2 instance fails, then your instance will be down until it is restarted. There are services (including one run by Amazon themselves, if memory serves) that will automatically restart instances that fail, but by default, once it's down it's down.

share|improve this answer

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.