Hacker News new | ask | show | jobs
by aluskuiuc 4483 days ago
I'll pick this comment out of the many to reply to rather than spamming - you do not lose your data when you reboot an EC2 instance. Local ephemeral stores are retained unless you terminate or 'stop' your instance - but a reboot is just fine.
2 comments

"Local ephemeral stores are retained unless you terminate your instance"

That sentence makes no sense to people with no AWS experience. But if you give someone with Linux experience secure shell access to a DigitalOcean server they can hit the ground running.

If you shut down your server you lose the data that was stored on the local drives, no different to DO. If you shut down your droplet on DO you lose the data stored on the local drives (in fact DO now scrubs the disks on shutdown after a recent security screw-up). The only difference is that most folk on AWS use EBS storage (something which DO still doesn't offer) which allows you to have drives which can continue to exist after your server is no more and allows you to attach more storage without getting a bigger server.

It's not rocket science:

instance = virtual server ("droplet" in DO speak)

terminate = shut down

ephemeral store = local disk

An EC2 instance is just a virtual server so anyone who knows Linux, Windows, BSD or even Solaris can "hit the ground running" there too.

When you say shutdown are talking about issuing commands from the command line like 'shutdown now' or 'reboot'? Because with Digital Ocean you DO NOT lose your data when you issue those commands. I know from experience.
Terminate in EC2 is basically the same as the Destroy call of DO. In both cases you will destroy the data stored locally. Rebooting an EC2 instance will not result in data loss, same as DO.
I really appreciate your comment. I feel really dumb for not knowing that. I always assumed the worst. Want to reboot and instance to just check the init process?... can't do that on Amazon. I'll pick a different platform. I was way off base.

That being said, do they dump your instance if they reboot the physical server? I was under the impression that "Oh we want to upgrade they hypervisor kernel, your instance is toast", was fairgame/default on Amazon.

> That being said, do they dump your instance if they reboot the physical server? I was under the impression that "Oh we want to upgrade they hypervisor kernel, your instance is toast", was fairgame/default on Amazon.

Nope. In most cases, you get two weeks warning before a physical host is decommissioned. I've gotten as little as 24 hours (guessing it was a more significant than usual hardware issue).

When that happens, you can just stop the instance, then start it again. That moves it onto a new physical host. If you don't do it in the 14 days, Amazon does it automatically. No loss of data, and just a few minutes of downtime if your startup scripts are OK.

You mean they copy the ephemeral disk over? Really?

Amazon should really advertise this, if that is the case. I was under the impression that Amazon couldn't be relied on as a VPS.

If you get a notification that your instance is going to get terminated - then yes, you can stop/start, but then you will lose ephemeral disks (but not EBS volumes). If you get a notification that your instance is just going to get rebooted, then nothing's going to get lost.

As I said above - the terminology can get hairy pretty fast. It's valuable to take stock of what you really need persisted, and what use can be made of 'scratch disks'. Local ephemerals are fast and cheap (included in the price of any instance). They come with the operational overhead of needing to rsync data off of them yourself if you want to retire that instance however.

No, not ephemeral disks. They're typically used for temp files, caches, etc., or servers you can afford to lose. EBS volumes are persistent and work just fine between stop/starts.
Eh, don't feel dumb. I can't really claim it's totally unambiguous and not confusing. Rebooting the physical server should only reboot your instance.
Rebooting the physical server does only reboot your instance. The your instance is toast thing is for hardware failure.