Live data from Hacker News

GCP releases Spot VMs, the next generation of Pre-emptible VMs

cloud.google.com

121–129 of 129 posts

Re: GCP releases Spot VMs, the next generation of Pre-emptible VMs

#121
post #106

Earlier quoted context omitted.

They already replicated the S3 API as an alternative to the Google Cloud Storage API: https://cloud.google.com/storage/docs/migrating#migration-si...

I get the impression that's pretty common, Cloudflare's new product is S3 compatible too.

Yeah, S3 is very common. Google Cloud Storage interestingly did not use the S3 API, but then added a limited compatibility layer specifically for "Migrating from Amazon S3".

Re: GCP releases Spot VMs, the next generation of Pre-emptible VMs

#122
post #104

Earlier quoted context omitted.

Yeah, GCP spot instances don't vary in price like AWS ("The price adjustments will occur at most once a month").

There is no longer bidding for spot prices on AWS. They moved to model where pay the fixed spot price which isn't based on capacity. https://aws.amazon.com/blogs/compute/new-amazon-ec2-spot-pri...

Interesting! I think it still updates more than once a month, but that is a significant change that I wasn't aware of, thank you.

Re: GCP releases Spot VMs, the next generation of Pre-emptible VMs

#123
post #29

Earlier quoted context omitted.

I run a small CI system which starts relatively beefy preemptible instances for jobs. Normally those instances are terminated by the job scheduler as soon as there's nothing more to do. But it's a great peace of mind knowing they can't run for more than 24h if my job scheduler screws something up for whatever reason. I see it as a feature rather an a limitation for my use case.

Yes, but they could just provide a flag `maxLifetime` which defaults to `24h` but can be set to 0. (It can even only accept those two values) Instead they created a whole new API for basically the same feature.

This would be superior of course. Ideally being able to limit maximum runtime down to one hours.

Re: GCP releases Spot VMs, the next generation of Pre-emptible VMs

#124
post #19

Earlier quoted context omitted.

All our pernos.co infrastructure uses AWS spot VMs. Batch processing runs on spot and fails over to regular VMs as necessary. CI jobs run on spot. Our front-end server running the Web site and our application also runs on spot and automatically fails over to a regular VM if it gets terminated. Termination is rare.

How do you coordinate the failover? Custom scripts or?

We use custom logic. There are various ways to do it. One way to do it is to poll for the termination signal on the running instance, as part of your app say, and if you see termination coming, trigger a Lambda that supervises the bringup of an on-demand instance. For critical stuff you probably want a backup system that checks instance health and brings up a new instance if the old one is not available ... but you probably want that even if you always run on-demand.

Re: GCP releases Spot VMs, the next generation of Pre-emptible VMs

#125
post #37
post #20

Earlier quoted context omitted.

Just spin up regular VMs if you can't get spot instances when you need them.

Lack of spot VM means that all spare capacity has been taken up by the regular VMs, meaning that it spots are gone, so are regular ones.

Maybe that's true but we haven't seen this happen in practice. Maybe we're just incredibly lucky but we're able to get on-demand instances to recover after spot termination.

Re: GCP releases Spot VMs, the next generation of Pre-emptible VMs

#126
post #73
post #22

Earlier quoted context omitted.

In AWS we just `sudo shutdown +1440`. Then we can cancel the shutdown later if we need to.

In AWS I set up a few lambdas to shut down my instances automatically because I've had some cases where everything crashes so thoroughly that the shutdown doesn't go off.

That sounds painful!

Re: GCP releases Spot VMs, the next generation of Pre-emptible VMs

#127
post #81
post #62

Earlier quoted context omitted.

There are tools that enable this (e.g. look at temporal.io). As for external storage: yes, you do generate more metadata, but that's often a tiny fraction of the cost saved by moving to spot machines. In general, these tools are adopted more for increasing reliability of existing systems, but I predict they would be a neat fit to run them on spot machines.

+1 for Temporal. Using in prod, its great

(i work at Temporal) nice! glad you're happy with it, would love to learn more if you have any compliments/complaints, lets hear it :)

Re: GCP releases Spot VMs, the next generation of Pre-emptible VMs

#129
post #25

Earlier quoted context omitted.

Tha sounds like a horrific dev environment, if randomly shut down with 30 seconds notice.

"Horrific" is massive hyperbole, at least for my use case. (I actually use a GCP preemptible instance in this manner for a personal project, and spot instances will have the same shutoff risk.) I edit application code on my (relatively underpowered) laptop, and automatically mirror it to the instance where the running services picks up any changes, and recompiles and relaunches as needed. It's a fairly chunky app cod…

But what if you were in the middle of stepping through with the debugger?
Post reply on HN