News for hackers. Stuff that matters.
Re:We use Kubernetes and spot instances to reduce EC2 billin... by PudgePacket on Monday February 24, 2020 @10:25PM (#22410672)
This is quite a neat strategy, leveraging elastic compute costs and kubernetes "self-healing". I'm surprised I haven't heard more about this kind of technique before.

I fully acknowledge this will only work in certain scenarios and for certain workloads, eg not ideal for long running/cache/database style services.

Re:We use Kubernetes and spot instances to reduce EC2 billin... by gopalv on Monday February 24, 2020 @10:34PM (#22410712)
> leveraging elastic compute costs and kubernetes "self-healing"

The indirect effect of building on a system like this is that the recovery mechanisms get tested on a regular basis instead of just on the odd day when things fail.

Spot instances are like a natural chaosmonkey mode, with money being saved and forcing you to build failure tolerance, retries & circuit breakers early in dev.

Re:We use Kubernetes and spot instances to reduce EC2 billin... by halbritt on Monday February 24, 2020 @11:11PM (#22410843)
GCP has a similar instance type called "preemptible", they're not quite as cheap as spot, but they don't "dry up" and they're guaranteed to go down every 24 hours.

This precludes one from becoming complacent with spot instances that rarely go away.

Re:We use Kubernetes and spot instances to reduce EC2 billin... by jedifans on Tuesday February 25, 2020 @01:00AM (#22411234)
https://cloud.google.com/kubernetes-engine/docs/how-to/preem... states that preemtible VMs aren't guaranteed to be available.
Re:We use Kubernetes and spot instances to reduce EC2 billin... by tuananh on Monday February 24, 2020 @11:54PM (#22411006)
You're right. spot instances are a lot more stable than preemptible. we've seen spot instances that last a year for us.
Re:We use Kubernetes and spot instances to reduce EC2 billin... by halbritt on Tuesday February 25, 2020 @12:02AM (#22411035)
This is the second response of this sort that I'm replying to.

"A lot more stable" isn't really a desirable characteristic of ephemeral compute capacity. In my experience, the less frequently the instances went away, the more complacent the operators became.

Preemptible instance are stable in the sense that you know they're going away within 24 hours and must be prepared for that.

Re:We use Kubernetes and spot instances to reduce EC2 billin... by tuananh on Tuesday February 25, 2020 @12:05AM (#22411044)
true that.

spot used to be that way and the price was very sensitive. but AWS tweaked it so that it's more stable.

to the point, after a year or 2 of running spot instances, we don't feel the difference of spot and ondemand that much. we got complacent.

Re:We use Kubernetes and spot instances to reduce EC2 billin... by raverbashing on Tuesday February 25, 2020 @04:23AM (#22411854)
Yeah but Kubernetes "self-healing" a lot of times isn't. Or it just trips over itself (stuck pods, stuck cronjobs, etc).
Re:We use Kubernetes and spot instances to reduce EC2 billin... by toomuchtodo on Monday February 24, 2020 @10:27PM (#22410679)
This is run of the mill for job schedulers (Nomad, Mesos/Marathon, Globus), it’s just more accessible with k8s, containers, and VM spot pricing than historically.

As you mention, definitely don’t do this where persistence is paramount (cache that is expensive to backfill upon recovery, database, etc) but it’s just fine for transient workloads or workloads you can rapidly and safely preempt and resume.

Re:We use Kubernetes and spot instances to reduce EC2 billin... by 3fe9a03ccd14ca5 on Monday February 24, 2020 @10:33PM (#22410706)
If your instance is stateless, and your app can easily self-heal, there’s lots of computing paradigms you can explore. Serverless/function is also an option.

Of course, at the end of the day rarely is something ever truly stateless.

Re:We use Kubernetes and spot instances to reduce EC2 billin... by halbritt on Monday February 24, 2020 @11:06PM (#22410828)
Eh, I'm currently running an old version of DCOS which does a pretty terrible job of scaling down. Much more than just a scheduler is required to make this work well.
Re:We use Kubernetes and spot instances to reduce EC2 billin... by ec109685 on Tuesday February 25, 2020 @12:50AM (#22411203)
Yeah, your fleet can become fragmented.
Re:We use Kubernetes and spot instances to reduce EC2 billin... by dcolkitt on Monday February 24, 2020 @11:18PM (#22410874)
> not ideal for long running/cache/database style services.

Well, one question to ask yourself when considering going down this route is whether it makes more sense to move all the statefulness into managed services, like Aurora, BigTable, S3, etc.

That drastically simplifies life. Now the only infrastructure directly managed by you are stateless workloads that can easily be self-healed, rolled back, scaled up/down, etc. Managed DBs are more expensive than running your own DB, but most likely the cost savings of moving the rest of the infrastructure to spot/preemptible outweighs this difference.