back

by wglb·17y ago·view on hn ↗
So how long does it take to power up amazon instances in the case of a news item like this? Or do you have to have them standing by already allocated? If so, isn't it cheaper to build you own?
1 comments
Ways I've found that work for pretty quick scaling on EC2 (YMMV, and I'm not that smart or seasoned on it, so don't take this as canon.)

You need to have the elastic block storage (or some remotely mountable storage you trust to be up). On this storage, you put things like your database and other dynamic content that you expect to persist through a reboot of the box, which reverts back to its base image.

You need to configure a couple of boxes at least, one to act as a load balancer, and another to act as the content provider. For more laden sites than mine, you might also need a separate instance for just the DB.

You are going to eat the cost of static IPs for at least a few boxes, but that's pretty cheap. Configure those IPs to be in your load balancer always. They'll fail when they're down, but that shouldn't be an issue.

At this point, you can have basically as many boxes available as you have previously allocated, and bringing them online is as simple as turning them on. You could probably use CloudKick to dynamically bring them online, but I haven't really played with it to know.

If you need scaling past that allocation, you can bring up more instances (the bottleneck will of course be the DB), and register them with the load balancer as you need.