ようへいの日々精進XP

よかろうもん

2019 年 11 月 05 日 (火)

ジョギング

  • 寝坊の為, お休み
  • 右足踵周りの痛みもあったのでいい機会かな

ギョーム

  • WordPress の深淵を覗いてしまった... まじ, 辛かった
  • EC2 AutoScaling + Spot Instance の検証

OnDemandPercentageAboveBaseCapacity の設定値 (パーセントで指定する) で, 起動するインスタンスのオンデマンドとスポットインスタンスの割合を確認した. 結果は以下のような感じになった.

on_demand_base_capacity                  : 1 # terraform ではここの値は String 型で指定する
on_demand_percentage_above_base_capacity : 50% # terraform ではここの値は Int 型で指定する
desire count                             : 10 台
=> 6:4 = ondemand:spot

on_demand_base_capacity                  : 1
on_demand_percentage_above_base_capacity : 0%
desire count                             : 10 台
=> 1:9 = ondemand:spot

# 途中から変更してみた 10% -> 50%
on_demand_base_capacity                  : 1
on_demand_percentage_above_base_capacity : 10%
desire count                             : 10 台
=> 2:8 = ondemand:spot
↓
on_demand_base_capacity                  : 1
on_demand_percentage_above_base_capacity : 50%
desire count                             : 10 台
=> 6:4 = ondemand:spot

on_demand_base_capacity                  : 1
on_demand_percentage_above_base_capacity : 25%
desire count                             : 5 台
=> 2:3 = ondemand:spot

on_demand_base_capacity                  : 1
on_demand_percentage_above_base_capacity : 25%
desire count                             : 10 台
=> 4:6 = ondemand:spot

設定は Terraform の aws_autoscaling_group リソースの instances_distribution.on_demand_percentage_above_base_capacity を調整しながら確認した. インスタンスタイプは t2, t3 系を三種類混ぜてみたけど, 大きな偏りもなくインスタンスが起動した.

夕飯

  • 奥さん特製のフライパン豚カツ, 味がしっかりついていて美味しゅうございました