Hacker News new | ask | show | jobs
by mchanson 5279 days ago
This is the most important lesson here. I've heard too many stories that end badly and I've learned this the hard way myself.
2 comments

Ooops sorry, downvoted by accident.

I have a question though: how do people get bitten by this lack of instance persistence?

In many cases, there are people who don't do their homework and set up regular, VPS-like web servers on EC2. What happens then, is that they have a real, established website that, weeks, months or years down the road, eventually gets rebooted, and disappears.

The EC2 instances boot to 'boot images', basically. Most of the images are like CDs, and contain just enough to get you ready to install your webserver, database, yadda yadda.

You can configure your image how you like, and then create a new 'image', which will be what your machine looks like after a reboot, but unless you use a persistent data store or external storage of some sort, you can't add new blog posts and expect them to be there after a reboot.

There are easy ways around it, and in fact, are best practices for application design, but compared to the normal shared hosting or VPS configurations that most people know, it is completely different.

Oh hah, I wasn't even thinking like that.

Yep, it's a good idea to save your work.

The other lesson I'd add is that if an instance dies and can't be rebooted, you'll need to stop/start it, which will result in an IP address change.

Best to have elastic IPs at the ready for that instance, or be prepared to deal with the IP changes.