Settings

Theme

Ask HN: Should I spin up and spin down VMs constantly?

8 points by talltofu 10 years ago · 5 comments · 1 min read


I was wondering if anyone had any suggestions on what the right 'cloudy' way of doing things are. Should I spin up a VM on the cloud and use it forever like I do with a physical machine? Or should I constantly spin up and spin down VMs daily? My VMs are stateless.

Are there organizations that have chosen one path or the other and have had success? Links to blogs/articles would be appreciated

boulos 10 years ago

You should on GCE, but not on EC2: per-hour billing for EC2 means your 15 minute VM costs you 60 (aka 4x as much). We (sadly) have a 10 minute minimum, but the difference is pretty stark.

Once they got through some growing pains (rate limits per project), Travis CI has switched to a 1 VM per build model that they'll probably detail in future blog posts.

https://blog.travis-ci.com/2016-04-07-migration-update

Disclaimer: I work on GCE, so of course I want you to use it ;).

stephenr 10 years ago

The only way AWS is cheaper than other providers is if you take advantage of the ability to spin up an EC2 instance from an image for just the time you need it, and spin it down when you don't.

If you're not using AWS, check to see how up/down affects your costs. Some will still charge you for VM's that are "down", meaning there is limited benefit (to you directly) to spinning them down.

  • talltofuOP 10 years ago

    Thanks Stephen. Are there any large scale AWS implementations that you know of that spin VMs up and down? Also, besides cost, are there benefits to doing so?

wave 10 years ago

If you have a stateless architecture, you should use Google's Preemptive VM. It is cheaper https://cloud.google.com/preemptible-vms/

r_groop 10 years ago

r_groop

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection