こんにちは!グリフォンでインフラやってる徳田です。 本記事は CyberAgent Developers Advent Calendar 2017 の 24 日目の記事になります。 グリフォンではGCPのPreemptible InstanceをWebサーバーとして活用しているのですが、それについての利用方法やTipsなどを紹介しようと思います。 Preemptible Instanceとは Preemptible Instanceは以下の特徴があります。 通常VMより低価格(およそ8割引き!!)で作成が可能GCP側の都合でシャットダウン24時間実行後、確実にシャットダウン常に利用できるわけではないSLA対象外 お値段大事。8割引きには惹かれちゃいますよね〜。 プリエンプト処理 Preemptible Instanceがプリエンプトされる際は以下の流れで処理が行われます。 インスタンスにA