本文介绍了使用Spot Fleet Autoscaling代替具有现货价格的AutoScaling组有什么优势?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,Amazon AWS发布了针对现货船队的自动扩展()。
Auto Scaling组已经允许您设置竞价价格以优惠价获得竞价型实例,而不是预留实例。

Recently Amazon AWS released Auto Scaling for Spot Fleets (https://aws.amazon.com/blogs/aws/new-auto-scaling-for-ec2-spot-fleets/).Auto Scaling groups already allowed you to set a Spot Price to get Spot Instances at a discount instead of Reserved Instances.

据我所知,竞价型舰队允许您根据vCPU定义舰队容量,混合使用不同的实例类型以实现此目的。据我所知,我认为这无法使用Auto Scaling完成。

As far as I could see Spot Fleets allow you to define the fleet capacity in terms of vCPU, mixing different instance types to achieve this. I don't think this can be done using Auto Scaling as far as I know.

我的用例非常简单:使用Spot Fleets(或对Spot实例进行Auto Scaling) )以降低的价格增加群集的容量,同时保持最小的所需预留实例,以防万一。我可以复制我的ASG,设定现货价格,然后就可以完成,但是显然,此功能现在也作为Spot Fleets的一部分存在。

My use case is pretty simple: use Spot Fleets (or Auto Scaling with Spot instances) to increase the capacity of my cluster at a reduced price while keeping the minimum required Reserved Instances just in case. I could duplicate my ASG, set a spot price and I'd be done, but apparently this functionality now also exists as part of Spot Fleets.

一个以上?有什么主要的理由要切换吗?

What is the advantage of one over the other? Are there any major reasons to switch?

推荐答案

我可能已经找到了继续使用自动伸缩组和竞价型实例的正当理由。 :您可以将它们附加到负载均衡器/目标组,而现货船队目前无法做到这一点。

I might've found a valid reason to keep using Auto Scaling Groups with Spot Instances: you can attach those to a load balancer / target group, while spot fleets can't do that as of now.

对于我的用例而言,这并不重要无论如何,因为我的群集是ECS群集,并且启动容器时实例会自动在目标组中注册,但是无论如何还是要了解这一点。

Not that it matters too much for my use case any way as my cluster is an ECS cluster and instances will get registered in target groups automatically when launching containers, but it's good to know anyway.

编辑:显然Spot Fleets可以也不支持CreationPolicies,因此您要么使用ASG,要么在需要时可以使用WaitConditions。

Apparently Spot Fleets do not support CreationPolicies either, so you're either left to use ASGs or have some fun with WaitConditions if that is needed.

这篇关于使用Spot Fleet Autoscaling代替具有现货价格的AutoScaling组有什么优势?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 21:14