Instance type is non-deterministic when deploying machines with cpu/mem constraints in aws
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
While deploying the Charmed Kubernetes bundle a few times with Juju bootstrapped on AWS I noticed the instance types I was assigned would vary between deployment. For example, machines needing 4CPU/16GB RAM received t3.xlarge ($0.0832/hr), m5d.xlarge ($0.226/hr), or m5n.xlarge ($0.238/hr) depending on the deployment, a pretty large cost spread.
I could be wrong, but a quick look at the code made me suspect that (assuming Juju is taking cost into account when picking which type to deploy) Juju is querying the spot price* (eg: discount price for if I want an instance that AWS can kill and take back at any moment) rather than the on-demand price (which I'd argue is more likely what we'd be paying for when Juju deploys a machine). A look at the spot prices when deploying above did find that m5n.xlarge machines were the cheapest of those three when I received them.
* https:/
(aside: I do see guidance that I can specify the instance type directly (https:/
Changed in juju: | |
status: | New → Triaged |
The issue is that from what we could tell, Amazon doesn't give a query
endpoint for on-demand prices. They have a large (~500MB) JSON blob that
can be downloaded to list all of their SKUs, but it is an expensive query
(and doesn't support a compressed request or transfer compression). We were
hoping that spot prices would provide a reasonable approximation, but it is
true that isn't a 1:1.
On Fri, Jan 21, 2022 at 10:05 AM Juan M. Tirado <email address hidden>
wrote:
> ** Changed in: juju /bugs.launchpad .net/bugs/ 1958574 /bugs.launchpad .net/juju/ +bug/1958574/ +subscriptions
> Status: New => Triaged
>
> --
> You received this bug notification because you are subscribed to juju.
> Matching subscriptions: juju bugs
> https:/
>
> Title:
> Instance type is non-deterministic when deploying machines with
> cpu/mem constraints in aws
>
> To manage notifications about this bug go to:
> https:/
>
>