dangyuluo
V2EX  ›  云计算

AWS Spot Instance 平均多久会被回收?

By dangyuluo at 2019 年 10 月 9 日 · 5507 次点击

我们在用 AWS EKS 作为服务器集群,想用 Spot Instance 来省一些钱。请问大家有没有经验,Spot Instances 平均来讲多久会被系统回收?谢谢。

us-west-2 区

15 条回复  •  2019-10-11 09:05:25 +08:00
lovestudykid
   1
lovestudykid  
   2019 年 10 月 9 日
这个不是看你设的价格多少么?设的价格高,就很安全
binux
   2
binux  
   2019 年 10 月 9 日
面对面问过 AWS support,这是机密,不管怎么问就是不告诉你。你自己试。
dangyuluo
   3
dangyuluo  
OP
   2019 年 10 月 9 日
@lovestudykid 是这样么? 那么如果我设置成 on demand 的价格,岂不是永远不会被关掉?
lovestudykid
   4
lovestudykid  
   2019 年 10 月 9 日
@dangyuluo 额,Amazon 的确是承诺不会高于 on demand 价格,但是它还说了如果需求太高也有可能终止,这个就不知道怎么看了。我也就是偶尔用用它的 GPU 节点,没有你这种长时间使用的经验,还是不误导你了。
binux
   5
binux  
   2019 年 10 月 9 日
@lovestudykid #1 现在不是竞价模式了,terminate 和价格无关了。
dangyuluo
   6
dangyuluo  
OP
   2019 年 10 月 9 日
@binux 也就是说哪怕报价再高,AWS 也会时不时关掉你的机器是么
binux
   7
binux  
   2019 年 10 月 9 日   ❤️ 1
@dangyuluo #6 我这有一份我们最近 7 天被 instance-terminated-capacity-oversubscribed 的机器类型和运行时长(秒)。我们最近 7 天 interrupt rate ( 被 AWS terminate / 所有 terminate )是 18%,你可以参考

us-east-1c c5.xlarge 11043
us-east-1d c5.xlarge 67069
us-east-1d c5.xlarge 15290
us-east-1d c5.xlarge 511
us-east-1d c5.xlarge 3700
us-east-1d c5.xlarge 1131
us-east-1d c5.xlarge 1233
us-east-1c c5.xlarge 148
us-east-1b c5.xlarge 152
us-east-1f c5.xlarge 4041
us-east-1d c5.xlarge 283
us-east-1f c5.xlarge 2375
us-east-1f c5.xlarge 1619
us-east-1b c5.xlarge 1060
us-east-1b c5.xlarge 58
us-east-1d c5.xlarge 474
us-east-1d c5.xlarge 4831
us-east-1a c5.xlarge 419497
us-east-1c c5.xlarge 2252
us-east-1d c5.xlarge 734
us-east-1d c5.xlarge 528
us-east-1b c5.xlarge 220
us-east-1d c5.xlarge 2486
us-east-1d c5.xlarge 679
us-east-1b c5.xlarge 285
us-east-1d c5.xlarge 388
us-east-1b c5.xlarge 1006
us-east-1d c5.xlarge 5554
us-east-1d c5.xlarge 539
us-east-1b c5.xlarge 105
us-east-1b c5.xlarge 26
us-east-1f c5.xlarge 10295
binux
   8
binux  
   2019 年 10 月 9 日
@binux #7 另外我们还有用 c4.large, m4.xlarge, m4.large, t3.medium 都没有被 instance-terminated-capacity-oversubscribed
dangyuluo
   9
dangyuluo  
OP
   2019 年 10 月 9 日
@binux 简直有用了,是在 billing 里看到的么?还是 cloudwatch?
binux
   10
binux  
   2019 年 10 月 9 日   ❤️ 2
@dangyuluo #9
`aws ec2 describe-spot-instance-requests --filters Name=status-code,Values=instance-terminated-capacity-oversubscribed | jq -r '.SpotInstanceRequests[] | [.LaunchedAvailabilityZone, .LaunchSpecification.InstanceType, (.Status.UpdateTime | strptime("%Y-%m-%dT%H:%M:%S.000Z") | mktime) - (.CreateTime | strptime("%Y-%m-%dT%H:%M:%S.000Z") | mktime)] | join("\t")'`
5YIZNKbT33b6jLTM
   11
5YIZNKbT33b6jLTM  
   2019 年 10 月 9 日
如果怕关,,就用 define duration workloads,,不过价格感人。。。。。
knightdf
   12
knightdf  
   2019 年 10 月 9 日
一般跑几个小时都是够的,价格波动不是特别大,所以看你设置的价格
ddou
   13
ddou  
   2019 年 10 月 10 日
@dangyuluo 价格跟 on demand 一样,就没必要用 spot instance 了吧
dangyuluo
   14
dangyuluo  
OP
   2019 年 10 月 11 日
@ddou 那是最高报价,并不是最终计价价格
ddou
   15
ddou  
   2019 年 10 月 11 日 via Android
@dangyuluo 是的 我的意思是如果竞标价设成最高价,就没必要用 spot 了
Recommended Services
› Amazon Web Services
› LeanCloud
› New Relic
› ClearDB
© 2026 V2EX · 32ms · 3.9.8.5